powered by
If a time series contains NA's a random cluster will be assigned to that time series.
initialise_clustering( Y, S, k, kg, comfactor, robust, max_percent_outliers_tkmeans = 0, verbose = FALSE )
numeric vector
Y: NxT dataframe with the panel data of interest
the desired number of groups
number of common factors to be estimated
number of group specific factors to be estimated
estimated common factors
TRUE or FALSE: defines using the classical or robust algorithm to estimate beta
the proportion of observations to be trimmed
when TRUE, it prints messages
Y <- Y_dgp3 comfactor <- matrix(0, nrow = ncol(Y)) initialise_clustering(Y, 3, 0, c(3, 3, 3), comfactor, TRUE)
Run the code above in your browser using DataLab