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: Coefficient Constraints as Counterfactuals


From   Matthew C Mahutga <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: Coefficient Constraints as Counterfactuals
Date   Thu, 10 Jan 2013 22:37:42 +0000

Hi again.

I'll try that; thanks. The parameters are right but it does not give standard errors (etc). I'm guessing that it's because I have unbalanced data, which xtpcse is fickle with, but I don't haven't verified that with balanced data. 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Richard Williams
Sent: Thursday, January 10, 2013 2:32 PM
To: [email protected]
Subject: Re: st: Coefficient Constraints as Counterfactuals

Occasionally post-estimation commands will work when the estimation command is run under version control. I am guessing that won't be the case here, but you can try it, e.g.

Version 8: xtpcse...

Also, you said the predicted values were wrong...but were the parameter estimates right, I.e. did the constraint seem to work?

Sent from my iPad

On Jan 10, 2013, at 5:25 PM, Matthew C Mahutga <[email protected]> wrote:

> My apologies, Rich!
>
> I meant the latter, but that's only  true with the xtpcse command. If I use xtreg, for example, I get very plausible results. And thanks for the further advice.
>
> Cheers,
>
> Matthew
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Richard 
> Williams
> Sent: Thursday, January 10, 2013 2:21 PM
> To: [email protected]
> Subject: Re: st: Coefficient Constraints as Counterfactuals
>
> When you say it didn't work, do you mean it refused to run, or that the results were implausible? If the latter it may mean that the constraint imposed was implausible, e.g fixing a coefficient at 100 when the highest semi-reasonable value is 1.
>
> When it works, you could just constrain all parameters at what their unconstrained value was and then set the remaining parameter at whatever you want.
>
> Rich (not William! Having two first names has been a problem all my 
> life.)
>
> Sent from my iPad
>
> On Jan 10, 2013, at 5:08 PM, Matthew C Mahutga <[email protected]> wrote:
>
>> Thanks William and Nick.
>>
>> -linest- doesn't work for xtpcse, but I'm not sure why. It yields predicted values way beyond the observed bounds of the response.
>>
>> It works great for regress and xtreg (at least in my application) and is very intuitive to use. This does seem to be a nice approach insofar as it accommodates the covariance between parameters. But in my case, I'm engaging in pure unadulterated hypotheticals, and would actually prefer to keep the observed parameters fixed ;o).
>>
>> I attempted -estadd- or -eret2- to try to impose constraints post-facto, but had to admit they are beyond me.
>>
>> The procedure outlined by Nick gives intuitive results (at least for my purposes), but I'm still not exactly clear if I'm supposed to subtract from y (response, outcome, dependent) the constrained coefficient, or rather the product of the constrained coefficient and its covariate. My reading of his initial email leads me to believe it's the latter.
>>
>> Thanks for your help!
>>
>> Matthew
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Richard 
>> Williams
>> Sent: Thursday, January 10, 2013 12:23 PM
>> To: [email protected]; [email protected]
>> Subject: RE: st: Coefficient Constraints as Counterfactuals
>>
>> Here is an example using -linest- (which, of course, requires that 
>> you install -linest-. It is from the STB and can be found with 
>> -findit-)
>>
>> use "http://www.indiana.edu/~jslsoc/stata/spex_data/ordwarm2.dta";,
>> clear logit warmlt3 yr89 male white age ed test yr89 = -.5, coef 
>> constraint 1 yr89 = -.5 linest, c(1) modify logit warmlt3 yr89 male 
>> white age ed, constraint(1)
>>
>> Note that the test command and linest produce the same coefficients.
>> Further imposing constraints after estimation gives different results than imposing constraints before estimation -- but they are supposed to be asympotically equivalent (like the difference between a LR chi square and a Wald chi-square).
>>
>> I don't know if it works with xtpcse, but you can try it.
>>
>>
>> At 02:18 PM 1/10/2013, Matthew C Mahutga wrote:
>>> Hi Nick.
>>>
>>> Thanks for this and for asking me to clarify.
>>>
>>> I'm using xtpcse with a first order autocorrelation correction.
>>>
>>> Do I understand you correctly that if my original model (with other 
>>> covariates omitted) is
>>>
>>> Y = b0 + b1x1+b2x2+b3x1*x2
>>>
>>> And I want to estimate the predicted values of a model in which b1 =
>>> b1+b3, then I would regress Y^(=y-b1+b3x1) on x2 and the rest of the
>>> covariates and then estimated the prediction?
>>>
>>> Thanks again,
>>>
>>> Matthew
>>>
>>> -----Original Message-----
>>> From: [email protected]
>>> [mailto:[email protected]] On Behalf Of Nick Cox
>>> Sent: Thursday, January 10, 2013 10:41 AM
>>> To: [email protected]
>>> Subject: Re: st: Coefficient Constraints as Counterfactuals
>>>
>>> If you want say to -regress- such that
>>>
>>> y = b_0 + b_1 x_1 + 42 x_2
>>>
>>> then calculate
>>>
>>> y - 42 x_2
>>>
>>> and -regress- on x_1. Naturally, this isn't universal, but what 
>>> could be universal across all possible estimation commands? Moral:
>>> You should tell us more about the command you are using.
>>>
>>> Nick
>>>
>>> On Thu, Jan 10, 2013 at 6:25 PM, Matthew C Mahutga 
>>> <[email protected]> wrote:
>>>
>>>> I have a question that I hope has an easy answer that escapes me.
>>>>
>>>> I am using  estimation command that does not support the
>>> constraints option, but I would like to constrain a select group of 
>>> coefficients. For example, one model includes an interaction term 
>>> between a given socioeconomic process and a dummy variable for 
>>> institutional regime. I would like to ask questions like "what would 
>>> the trend in my outcome look like if the socioeconomic process had 
>>> the larger of the two conditional (i.e. by regime type) effects".
>>>>
>>>> Is there a universal means by which to set a given coefficient to
>>> a fixed value prior to model estimation. Or, can I estimate 
>>> predicted values using stored results but change the coefficient on 
>>> one covariate beforehand?
>>>
>>> *
>>> *   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/
>>
>> -------------------------------------------
>> Richard Williams, Notre Dame Dept of Sociology
>> OFFICE: (574)631-6668, (574)631-6463
>> HOME:   (574)289-5227
>> EMAIL:  [email protected]
>> WWW:    http://www.nd.edu/~rwilliam
>>
>> *
>> *   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/
>
> *
> *   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