On Thu, Mar 7, 2013 at 3:48 AM, Murat Genc <murat.genc@otago.ac.nz> wrote:
>
> The solution suggested by Maarteen there used the margins command in combination with nlcom. Based on that I tried the following
>
> margins, dydx(*) predict(equation(w1)) post nlcom e1_2: -1+(1/w1bar)*((pdfp1bar*coeflnp2eq1*(w1hatbar-[w1]pdfp1*pdfp1bar)/cdfp1bar)+cdfp1bar*([w1]shlnp21-[w1]lfp1*w2bar)-[w1]pdfp1*pdfp1bar*coeflnp2eq1*pr1bar)
>
> to do the calculation for one case. But when I try it I get an error message that says "option nlcom not allowed."
>
>
I haven't reviewed Maarten's solution or the appropriateness of your
adaptation, so my comment is confined to your error message. You've
placed -nlcom- on the same line as -margins-. Using your same code:
margins, dydx(*) predict(equation(w1)) post
// note new line here
nlcom e1_2: -1+(1/w1bar)*((pdfp1bar*coeflnp2eq1*(w1hatbar-[w1]pdfp1*pdfp1bar)/cdfp1bar)+cdfp1bar*([w1]shlnp21-[w1]lfp1*w2bar)-[w1]pdfp1*pdfp1bar*coeflnp2eq1*pr1bar)
Regards,
Rebecca
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/