Statalist The Stata Listserver


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

st: predicting (ui) after( xtivreg2) ?!


From   "Al-Darwish, Ahmed" <[email protected]>
To   <[email protected]>
Subject   st: predicting (ui) after( xtivreg2) ?!
Date   Fri, 13 Apr 2007 15:44:16 +0100

Dear Mark;
Here is what I'm doing:
1- center y x1 x2 x3 iv1 iv2:=: c_y c_x1 c_x2 c_x3 c_iv1 c_iv2
 
2- xtivreg2 c_y c_x1 c_x2 (c_x3=c_iv1 c_iv2), fe ro
 
3- predict eps,e
 
4- matrix beta=e(b)'
 
5- matrix beta2=beta["c_x1" "c_x2" "c_x3",1]'
 
6- matrix score yhat=beta2
 
7- ui=c_y -yhat- eps  
 
I have tried to use c_eps or (y)-not centerlized too but the same.,, results?!
Any comments will be appreciated it...
Cheers;
Ahmed

________________________________

From: [email protected] on behalf of Schaffer, Mark E
Sent: Fri 4/13/2007 1:46 PM
To: [email protected]
Subject: st: RE: RE: RE: predicting (ui) after( xtivreg2) ?!



Ahmed,

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Al-Darwish, Ahmed
> Sent: Friday, April 13, 2007 1:26 PM
> To: [email protected]
> Subject: st: RE: RE: predicting (ui) after( xtivreg2) ?!
>
> Dear Mark,
>   I did what you have suggested to predict (ui)..but I
> couldn't get a fixed value over time  like what xtivreg does?!
> Would there be any other way to make it obtaining an
> individual effect that is constant over time period.?!

Can you show us the code and perhaps we can figure out why it didn't
generate what you wanted?

--Mark

> Any comments will be appreciated?!
> Cheers;
> Ahmed
> ________________________________
>
> From: [email protected] on behalf of
> Schaffer, Mark E
> Sent: Wed 3/28/2007 4:59 PM
> To: [email protected]
> Subject: st: RE: predicting (ui) after( xtivreg2) ?!
>
>
>
> Ahmed,
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of
> Al-Darwish,
> > Ahmed
> > Sent: Wednesday, March 28, 2007 1:05 PM
> > To: [email protected]
> > Subject: st: predicting (ui) after( xtivreg2) ?!
> >
> > Dear StataListers;
> > Is there a way to predict the values of (ai)s or(ui)s after running
> > (xtivreg2) in a fixed effect -panel model?
>
> Official -xtivreg- uses the terminology u_i and v_it, and the
> -xtivreg2- help file refers to v_it.  -xtivreg2- will predict
> a v_it but not a u_i.
> I assume that your ai and ui mean the same thing as u_i.
>
> The problem is that -xtivreg2- doesn't estimate a coefficient
> for the constant.
>
> Maybe this is easy?
>
> Put all your variables (including the IVs) into
> mean-deviation form using Ben Jann's -center- command.  Make
> sure you center using a consistent sample.  Estimating on
> mean-deviation data should give you the same coefficients as
> estimating on the raw data (a useful check to make sure
> you've got the centering done correctly).
>
> Use -predict- to get the v_it.
>
> Use -matrix score- to get the fitted values yhat_it of your
> demeaned dependent variable.
>
> The u_i will be y_it - yhat_it - v_it.
>
> Or am I missing something here?
>
> --Mark
>
> > Many Thanks;
> > Ahmed
> >
> >
> >
> >
> >
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/support/faqs/res/findit.html
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> >
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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