Man pages for RCTS
Clustering Time Series While Resisting Outliers

adapt_pic_with_sigma2maxmodelAdapts the object that contains PIC for all candidate C's and...
adapt_X_estimating_less_variablesWhen running the algorithm with a different number of...
add_configurationAdds the current configuration (number of groups and factors)...
add_metricsAdds several metrics to df_results.
add_picFills in df_pic: adds a row with the calculated PIC for the...
add_pic_parallelCalculates the PIC for the current configuration.
beta_true_heterogroupsHelpfunction in create_true_beta() for the option...
calculate_best_configFunction that returns for each candidate C the best number of...
calculate_errors_virtual_groupsHelpfunction for update_g(). Calculates the errors for one of...
calculate_error_termCalculates the error term Y - X*beta_est - LF - LgFg.
calculate_FL_group_estimatedReturns the estimated groupfactorstructure.
calculate_FL_group_trueCalculate the true groupfactorstructure.
calculate_lambdacalculates factor loadings of common factors
calculate_lambda_groupcalculates factor loadings of groupfactors
calculate_lgfgCalculates the group factor structure: the matrix product of...
calculate_obj_for_gCalculates objective function for individual i and group k in...
calculate_PICFunction to determine PIC (panel information criterium)
calculate_PIC_term1Function to calculate the first term of PIC (panel...
calculate_sigma2Calculates sum of squared errors, divided by NT
calculate_sigma2maxmodelCalculates sigma2maxmodel
calculate_TN_factorHelpfunction. Calculates part of the 4th term of the PIC.
calculate_VCsquaredCalculates VC², to determine the stability of the found...
calculate_virtual_factor_and_lambda_groupHelpfunction used in update_g()
calculate_WCalculates W = Y - X*beta_est. It is used in the...
calculate_XB_estimatedCalculates (the estimated value of) the matrix X*beta_est.
calculate_XB_trueCalculates the product of X*beta_true .
calculate_Z_commonCalculates Z = Y - X*beta_est - LgFg. It is used in the...
calculate_Z_groupCalculates Z = Y - X*beta_est - LF. It is used to estimate...
check_stopping_rulesChecks the rules for stopping the algorithm, based on its...
clustering_with_robust_distancesFunction that puts individuals in a separate "class zero",...
create_covMat_crosssectional_dependenceFunction used in generating simulated data with non normal...
create_data_dgp2Creates an instance of DGP 2, as defined in...
create_true_betaCreates beta_true, which contains the true values of beta (=...
define_C_candidatesDefines the candidate values for C.
define_configurationsConstructs dataframe where the rows contains all...
define_kg_candidatesDefines the set of combinations of group specific factors.
define_number_subsetsReturns a vector with the indices of the subsets. Must start...
define_object_for_initial_clustering_macropcaDefines the object that will be used to define a initial...
define_rho_parametersDetermines parameters of rho-function.
determine_betaHelpfunction in estimate_beta() for estimating beta_est.
determine_robust_lambdaHelp-function for return_robust_lambdaobject().
df_results_exampleAn example for df_results. This dataframe contains the...
do_we_estimate_common_factorsHelpfunction to shorten code: are common factors being...
do_we_estimate_group_factorsHelpfunction to shorten code: are group factors being...
estimate_algorithmThis function is a wrapper around the initialization and the...
estimate_betaEstimates beta.
estimate_factorEstimates common factor(s) F.
estimate_factor_groupEstimates group factors Fg.
evade_crashes_macropcaSolves a very specific issue with MacroPCA.
evade_floating_point_errorsFunction to evade floating point errors.
factor_group_true_dgp3factor_group_true_dgp3 contains the values of the true group...
fill_rcFills in the optimized number of common factors for each C.
fill_rcjFills in the optimized number of groups and group specific...
final_estimations_filter_kgFilters dataframe on the requested group specific factors...
generate_grouped_factorstructureGenerates the true groupfactorstructure, to use in...
generate_YGenerate panel data Y for simulations.
get_best_configurationFinds the first stable interval after the first unstable...
get_convergence_speedDefines the convergence speed.
get_final_estimationFunction that returns the final clustering, based on the...
grid_add_variablesFunction which is used to have a dataframe (called "grid")...
g_true_dgp3g_true_dgp3 contains the true group memberships of the...
handle_macropca_errorsHelpfunction in robustpca().
handleNAFunction with as input a dataframe. (this will be "Y" or...
handleNA_LGRemoves NA's in LG (in function...
initialise_betaInitialisation of estimation of beta (the coefficients with...
initialise_clusteringFunction that clusters time series in a dataframe with...
initialise_commonfactorstructure_macropcaInitialises the estimation of the common factors and their...
initialise_df_picInitialises a dataframe which will contain the PIC for each...
initialise_df_resultsInitialises a dataframe that will contain an overview of...
initialise_rcInitialises rc.
initialise_rcjInitialises rcj.
initialise_XCreates X (the observable variables) to use in simulations.
iterateWrapper around estimate_beta(), update_g(), and estimating...
kg_candidates_expandFunction that returns the set of combinations of groupfactors...
lambda_group_true_dgp3lambda_group_true_dgp3 contains the values of the loadings to...
LMROBWrapper around lmrob.
make_df_pic_parallelMakes a dataframe with the PIC for each configuration and...
make_df_results_parallelMakes a dataframe with information on each configuration.
make_subsamplesSelects a subsample of the time series, and of the length of...
matrixnormFunction to calculate the norm of a matrix.
OF_vectorized3Calculates objective function for the classical algorithm:...
OF_vectorized_helpfunction3Helpfunction in OF_vectorized3()
parallel_algorithmWrapper of the loop over the subsets which in turn use the...
plot_VCsquaredPlots expression(VC^2) along with the corresponding number of...
prepare_for_robpcaHelpfunction: prepares object to perform robust PCA on.
RCTSRCTS
reassign_if_empty_groupsRandomly reassign individual(s) if there are empty groups....
restructure_X_to_order_slowN_fastTRestructures X (which is an 3D-array of dimensions (N,T,p) to...
return_robust_lambdaobjectCalculates robust loadings
robustpcaFunction that uses robust PCA and estimates robust factors...
run_configWrapper around the non-parallel algorithm, to estimate beta,...
scaling_XScaling of X.
solveFGHelpfunction in update_g(), to calculate solve(FG x t(FG)) x...
tabulate_potential_CShows the configurations for potential C's of the first...
update_gFunction that estimates group membership.
X_dgp3The dataset X_dgp3 contains the values of the 3 observable...
Y_dgp3Y_dgp3 contains a simulated dataset for DGP 3.
RCTS documentation built on May 31, 2023, 9:20 p.m.