I am trying to estimate a nonparametic regression using -npregress-. I first tried to estimate the following:
I get an error saying that there are insignificant observations to compute the bootstrapped standard errors. So I tried adding the -nodrop- option and estimated the following:
I get results for this:
After this, I want to get the marginal effects, so I run this line of code:
and I get the following error:
unfortunately, I cannot share the data because I am working with a restricted data set, but I am hoping someone has some insight as to the problem. I am running the regression and margins command at the same time, so I am not changing the data or anything at all inbetween npregress and margins.
Thanks for any help!
Tim
Code:
npregress kernel sin_totHomeExp age_female if P == 1 & age_female >= 50, vce(bootstrap, seed(1234))
Code:
npregress kernel sin_totHomeExp age_female if P == 1 & age_female >= 50, vce(bootstrap, seed(1234) nodrop)
Code:
Observed Estimate Bootstrapped Std. Err. z P>|z| Mean sin_totHomeExp 5.837566 0.411449 141.88 0.000 Effect age_female -0.0603533 0.0048706 -12.39 0.000
Code:
margins, at(age_female=(50(2)85))
Code:
data have changed since estimation. Margins and predictafter npregress will not work if your covariates, your dependent variable, or the predictions from npregress have changed since estimation. r(198)
Thanks for any help!
Tim
Comment