How do I specify covariates for regression discontinuity model using 'rdrobust' package in R?
The problem is with 'covs' parameter in the code below. It is supposed to allow specifying additional covariates for the model. I have tried providing a vector of vectors from the dataset (as in the code below) and a vector of variable names but neither seem to work.
fm = rdrobust(datasets$CONTINUANCE,
dataset$T,
p=3,
covs=c(dataset$CONTENT_LENGTH, dataset$CONTENT_SNIPPET),
kernel='uniform',
weights=dataset$USERS,
bwselect='msetwo',
vce='nn',
nnmatch=7,
level=95)
As a result, I get the following error:
Error in if (c <= x_min | c >= x_max) { :
missing value where TRUE/FALSE needed
Calls: rdrobust
Execution halted