Hi all
This is my first post, so apologies in advance if this is not clear. I am using the package "rdrobust" to conduct a regression discontinuity analysis. Our hypothesis is that Medicare eligibility at age 65 is associated with a discontinuity in total healthcare expenditures. We control for three variables: sex (variable name "sex"), employment ("empst31") and income ("faminc") and use data from the Medical Panel expenditure survey. Each time I try to add a survey pweight in the command line (bolded below), I get the same error (see below). If I remove the weight, the program can run without errors. Would greatly appreciate any advice. Thanks!
clear *
cls
cd "/Users/ChrisCai/Desktop/RDanalysis"
use MEPSfiles
*weight for complex survey design
svyset [pweight=perwt], strata( varstr) psu(varpsu) vce(linearized) singleunit(scaled)
*analyze regression discontinuity among adults, controlled for sex, employment and income
rdrobust totalexpenditures age if age>=18 , c(65) weights(perwt) covs(sex empst31 faminc )
I get the error below:
Mass points detected in the running variable.
rdrobust_res(): 3301 subscript invalid
rdrobust_bw(): - function returned error
<istmt>: - function returned error
This is my first post, so apologies in advance if this is not clear. I am using the package "rdrobust" to conduct a regression discontinuity analysis. Our hypothesis is that Medicare eligibility at age 65 is associated with a discontinuity in total healthcare expenditures. We control for three variables: sex (variable name "sex"), employment ("empst31") and income ("faminc") and use data from the Medical Panel expenditure survey. Each time I try to add a survey pweight in the command line (bolded below), I get the same error (see below). If I remove the weight, the program can run without errors. Would greatly appreciate any advice. Thanks!
clear *
cls
cd "/Users/ChrisCai/Desktop/RDanalysis"
use MEPSfiles
*weight for complex survey design
svyset [pweight=perwt], strata( varstr) psu(varpsu) vce(linearized) singleunit(scaled)
*analyze regression discontinuity among adults, controlled for sex, employment and income
rdrobust totalexpenditures age if age>=18 , c(65) weights(perwt) covs(sex empst31 faminc )
I get the error below:
Mass points detected in the running variable.
rdrobust_res(): 3301 subscript invalid
rdrobust_bw(): - function returned error
<istmt>: - function returned error

Comment