Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: prediction after regress


From   "Shehzad Ali" <sia500@york.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: prediction after regress
Date   Fri, 22 Aug 2008 10:38:51 +0100

Thanks, Eva. Your help is spot on.

Shehzad 

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Eva Poen
Sent: 22 August 2008 10:05
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: prediction after regress

Shehzad,

Yes, this does what you want. Alternatively, you could temporarily
recode your dummy variable and use -predict-:

replace insurance = 1-insurance
predict counterfactual if e(sample)
replace insurance = 1-insurance

Hope this helps,
Eva


2008/8/22 Shehzad Ali <sia500@york.ac.uk>:
> Hi listers,
>
> I am trying to get counterfactual predictions after regress. Basically,
> people in my sample are either insured or uninsured. I want to predict how
> much insured would spend if they were uninsured (assuming their other
> characteristics remained the same) and vice versa for the uninsured. Can
> -adjust- help in this situation? Here is what I was trying but not sure if
> this is right:
>
> reg y $xvar insurance_dummy
>
> adjust insurance=1 if insurance==0, gen(counter_1)
> adjust insurance=0 if insurance==1, gen(counter_0)
>
> I would appreciate any help.
>
> Thank you,
>
> Shehzad
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

Internal Virus Database is out of date.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.4.6/1540 - Release Date: 08/07/2008
06:33

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index