Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: nlcom


From   "Dimitriy V. Masterov" <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: nlcom
Date   Thu, 27 Mar 2014 13:11:42 -0700

If I understand what you have in mind correctly, this can be handled
somewhat indirectly with -margins, expression()- and looking at the
confidence interval.

Here's a simple example with the cars data:

sysuse auto, clear
reg price mpg weight i.foreign
margins, expression(foreign*_b[mpg]  - _b[mpg]/_b[weight])

In this case, the 95% CI contains zero, so you cannot reject the null.
This corresponds to the sample average of the expression.

You can also do this manually:
predictnl z = foreign*_b[mpg]  - _b[mpg]/_b[weight]
sum z

I don't think doing a ttest on z would be valid, however, since it
does not account for the estimation of the coefficients, so the
margins method would be preferred.

DVM

On Thu, Mar 27, 2014 at 12:18 PM, Alfonso Sanchez-Penalver
<[email protected]> wrote:
> Hi Nigussie,
>
> What you're suggesting would create a different value for each observation in z, so I don't see how that becomes a parameter. My first thought is that you would want to know the value of the parameter at a specific point of z: it's mean, it's median, etc... Then you could use -nlcom- using the sample mean or sample median for z or whatever value you choose. You can do nlcom for different values of z and test the significance of the combination at any value of z you want. So in principle you could loop across all observations of z and do a test for each observation, but why you would want to do that and what significance it could actually have escapes me.
>
> Best,
>
> Alfonso Sanchez-Penalver
>
>> On Mar 27, 2014, at 1:18 PM, Nigussie Tefera <[email protected]> wrote:
>>
>> Dear statlist,
>>
>> I want to estimate parameters by mixing/combining estimated
>> coefficients with variables through non-linear combinations. I know
>> that nlcom command can handle if all of them are coefficients instead
>> of variables, but don't know how to do if we have a combination of
>> variables and coefficients.
>>
>> suppose I have coefficients _b[w1], _b[w2], _b[w3] and a variable z.
>> Suppose I want to estimate and test the significance of the
>> coefficient from equations of this form:  z*_b[w1] - (_b[w2]/_b[w3]).
>> How can I proceed?  Your kind suggestion is very welcome.
>>
>> best
>>
>> Nigussie
>> *
>> *   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/
>
> *
> *   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/

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index