Model is initiated with a list of parameters most which include treated_units and donor_units, two dataframes that contain time periods, units, and counts of outcomes
new()ElasticSynth$new( treated_units, donor_units, measure_vars, measure_col, unit_col, time_col, value_col, pre_list, post_list, start_cv_list, end_cv_list, cv_step_list, start_month_list, end_month_list, time_unit_list, alphas = NULL, lambdas = NULL, lower_limit_weights, upper_limit_weights, placebo, verbose, max_pre_month, end_month, start_month )
treated_unitsTreated units data.frame
donor_unitsDonor units data.frame
measure_varsOutcome measures upon which to jointly fit a synthetic control
measure_colColumn name for measure_vars
unit_colColumn name for unit information
time_colColumn name for time information (in form 1:max(time))
pre_listA list of lists or vectors representing pre periods across all outcomes
post_listA list of lists or vectors representing post periods across all outcomes
start_cv_listA list indicating where to start CV procedure in time
end_cv_listA list indicating where to end CV procedure in time
time_unit_listA list indicating the time between time periods
alphasvector of alphas to use for cross validation - for more information see glment
cv_treated()ElasticSynth$cv_treated()
cv_untreated()ElasticSynth$cv_untreated()
cv()ElasticSynth$cv(type)
generate_weights()ElasticSynth$generate_weights(cv_results)
fit()ElasticSynth$fit(weights, cv_results)
plot()ElasticSynth$plot(series_frame)
generate_hyndman_folds()ElasticSynth$generate_hyndman_folds(start_cv, end_cv, cv_step)
long_to_wide()ElasticSynth$long_to_wide(dt, time_col, unit_col, value_col)
time_colColumn name for time information (in form 1:max(time))
unit_colColumn name for unit information
long_to_wide_weights()ElasticSynth$long_to_wide_weights( dt, pre_list, time_col, unit_col, measure_col, value_col, fitted_vars )
pre_listA list of lists or vectors representing pre periods across all outcomes
time_colColumn name for time information (in form 1:max(time))
unit_colColumn name for unit information
measure_colColumn name for measure_vars
clone()The objects of this class are cloneable with this method.
ElasticSynth$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.