Hello,
I am trying to figure out how to apply the bootstrap to nonlinear combinations of coefficient estimates after NL command. Here is an example of the type of NL command I am using:
nl (JOBSAT={b0}+{b1}*ALTHC+{b2}*ALTWC+{b3}*(ALTWC-{c0}-{c1}*ALTHC)*(ALTWC<{c0}+{c1}*ALTHC)), initial(b0 3.844 b1 0.588 b2 -0.222 b3 0.643 c0 0 c1 1) iter(1000)
After obtaining the estimates, I want to test nonlinear combinations such as this:
nlcom [b0]_cons+[b2]_cons*[c0]_cons
However, because these are nonlinear combinations of coefficients, the confidence intervals reported by STATA (which are based on normal theory) are incorrect from a technical standpoint (i.e., if the coefficients are normally distributed, products of the coefficients such as the ones I am computing will not be normally distributed). Therefore, I want to apply the bootstrap and obtain percentile-based confidence intervals (bias-corrected and perhaps bias-corrected and accelerated). Unfortunately, none of my attempts have been successful. For instance, I have tried prepending the nlcom commands with bootstrap:, and here is the result:
. bootstrap: nlcom [b0]_cons+[b2]_cons*[c0]_cons
(running nlcom on estimation sample)
last estimates not found
an error occurred when bootstrap executed nlcom
r(301);
I have also tried the vce(bootstrap) option. No dice.
. nlcom [b0]_cons+[b2]_cons*[c0]_cons, vce(bootstrap)
option vce() not allowed
r(198);
Among other things, I have tried to adapt the procedure shown here:
http://www.ats.ucla.edu/stat/stata/faq/modmed.htm
This procedure seems close to what I want, because it computes nonlinear combinations of coefficients and applies the bootstrap to them. But again, I have not been successful. I would appreciate any help you can provide.
Thanks,
Jeff Edwards
I am trying to figure out how to apply the bootstrap to nonlinear combinations of coefficient estimates after NL command. Here is an example of the type of NL command I am using:
nl (JOBSAT={b0}+{b1}*ALTHC+{b2}*ALTWC+{b3}*(ALTWC-{c0}-{c1}*ALTHC)*(ALTWC<{c0}+{c1}*ALTHC)), initial(b0 3.844 b1 0.588 b2 -0.222 b3 0.643 c0 0 c1 1) iter(1000)
After obtaining the estimates, I want to test nonlinear combinations such as this:
nlcom [b0]_cons+[b2]_cons*[c0]_cons
However, because these are nonlinear combinations of coefficients, the confidence intervals reported by STATA (which are based on normal theory) are incorrect from a technical standpoint (i.e., if the coefficients are normally distributed, products of the coefficients such as the ones I am computing will not be normally distributed). Therefore, I want to apply the bootstrap and obtain percentile-based confidence intervals (bias-corrected and perhaps bias-corrected and accelerated). Unfortunately, none of my attempts have been successful. For instance, I have tried prepending the nlcom commands with bootstrap:, and here is the result:
. bootstrap: nlcom [b0]_cons+[b2]_cons*[c0]_cons
(running nlcom on estimation sample)
last estimates not found
an error occurred when bootstrap executed nlcom
r(301);
I have also tried the vce(bootstrap) option. No dice.
. nlcom [b0]_cons+[b2]_cons*[c0]_cons, vce(bootstrap)
option vce() not allowed
r(198);
Among other things, I have tried to adapt the procedure shown here:
http://www.ats.ucla.edu/stat/stata/faq/modmed.htm
This procedure seems close to what I want, because it computes nonlinear combinations of coefficients and applies the bootstrap to them. But again, I have not been successful. I would appreciate any help you can provide.
Thanks,
Jeff Edwards
Comment