I am PhD student in one of UK university and planning to apply this technique. I did the estimation with covars.lagged =NULL. But when include co-variates it gives error, i.e.,
matches.cbps <- PanelMatch(lag = 2, max.lead = 4, time.id = "year", unit.id = "pidp", treatment = "dem", covars.lagged =c("agefelg"), formula = lwagegross ~ dem, method = "Pscore", weighting = TRUE, qoi = "ate", M = 3, data = dem)
Error in names(new_cols) <- lagged_names :
'names' attribute [2] must be the same length as the vector [1]
traceback()
4: FUN(X[[i]], ...)
3: lapply(df_list, lags_df, sort_var = sort_var, covar_combos, lagged_names)
2: make_lags(data, unit.id, time.id, covar_combos, lagged_names)
1: PanelMatch(lag = 2, max.lead = 4, time.id = "year", unit.id = "pidp",
treatment = "dem", covars.lagged = c("agefelg"), formula = lwagegross ~
dem, method = "Pscore", weighting = TRUE, qoi = "ate",
M = 3, data = dem)
I tried for online solution but it is not working, neither I see any issue with my data. New to R, so not sure how to solve this prob.
I will highly appreciate any help...
I am PhD student in one of UK university and planning to apply this technique. I did the estimation with covars.lagged =NULL. But when include co-variates it gives error, i.e.,
I tried for online solution but it is not working, neither I see any issue with my data. New to R, so not sure how to solve this prob. I will highly appreciate any help...