[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: some unexplained issues with coefficient comparisons
I am trying to implement the procedure as suggested by Mark but am not
being very successful (I did not write any code really since I am only
beginning to look at the stata codes). Here is one of the ways. It may
be very naive. Though this is not working. Here is what I wanted to
I tried this using the auto data:
1. Run the regression and display e(V)
reg price mpg headroom
matrix list e(V)
2. Make the degree of correction by hand
I randomly multiplied each cell in the matrix by 20
3. Input the new matrix after making the DOF correction using
matrix input mymat = (0.0682692,0.1931934, -2.0322256\0.1931934,
4. Replacing operation
eret2 matrix mymat = e(V), replace
I want to store the estimates and save them to be used later. but
during the 4th step I am facing the following error
"eret2 matrix mymat = e(V), replace
varlist not allowed"
I have two questions:
1. Is there a more efficient method that I can implement
2. Am I doing somethig wrong with my eret2 command.
I will be grateful if someone can resolve this problem. Mark: I
appreciate your help and reply so far.
On 6/29/06, Schaffer, Mark E <M.E.Schaffer@hw.ac.uk> wrote:
I don't use eret2 often, and as I have a plane to catch I can't look
into it now ... maybe some other Statalister can help?
It would in any case be helpful if you show us your code, and the error
message or where you think it's going wrong, so long as it isn't too
> -----Original Message-----
> From: firstname.lastname@example.org
> [mailto:email@example.com] On Behalf Of
> Narasimhan Sowmyanarayanan
> Sent: 29 June 2006 02:47
> To: firstname.lastname@example.org
> Subject: Re: st: some unexplained issues with coefficient comparisons
> Hello Mark:
> Thanks a lot for your email. I created two different datasets
> of demeaned variables. and ran OLS. I extracted the variance
> covariance matrix using estat and now know how to modify it.
> This may be trivial, but I could not make myself to store the
> matrix and make the DOF adjustment to the VCE. (If I am
> correct my areg had F( 6, 1181)
> and my regress had F( 6, 1357) = 19.23. So the DOF adjustment is
> (1357/1181) ? becasue the standard error adjustment is the
> square root of this number.
> I thought that the eret2 command I think needs a matrix name
> to enable me to repost the data but I am not very clear on
> how I should repost the variance covariance matrix.
> Some help would be highly appreciated since I am kind of
> stuck in this issue.
> On 6/27/06, Schaffer, Mark E <M.E.Schaffer@hw.ac.uk> wrote:
> > Narasimhan,
> > > -----Original Message-----
> > > From: email@example.com
> > > [mailto:firstname.lastname@example.org] On Behalf Of Jeff
> > > Pitblado, StataCorp LP
> > > Sent: 27 June 2006 16:40
> > > To: email@example.com
> > > Subject: Re: st: some unexplained issues with coefficient
> > > comparisons
> > >
> > > Narasimhan Sowmyanarayanan
> > > <firstname.lastname@example.org> is comparing results of
> > > -suest- after -areg- with an equivalent -regress- model with
> > > indicator variables:
> > >
> > > > I am facing one situation that I have not been able to
> intuit. I
> > > > ran
> > > > two different fixed effect panel regressions for
> different groups
> > and
> > > > compared the coefficients across the two groups. The
> test yeilded
> > that
> > > > there was no significant difference when I used 'suest'
> to compare
> > the
> > > > coefficients.
> > > >
> > > > Then I tried to run the same models in OLS using explicit dummy
> > > > variables. My estimates are very close (some difference possibly
> > came
> > > > because of some additional dummy variables that I tried
> to put in
> > that
> > > > I could not use in my fixed effects model). The
> coefficients that
> > > > I compared were very close. But when I ran the same comparison
> > > > using
> > OLS
> > > > I found that the coefficients were significantly different.
> > > >
> > > > To summarize the same coefficients when I used suest after areg
> > > > gave
> > > > me insignificant difference as compared to the usage of suest
> > > > after
> > a
> > > > simple regression with dummy variables which indicated the
> > difference
> > > > was significant.
> > >
> > > We've recently discovered that -suest- yields incorrect
> results when
> > > used after -areg-. This is not something that can easily
> be fixed
> > > given that the meat of the sandwich estimator of variance
> > > (Robust/Huber/White VCE) cannot be properly computed due
> to the fact
> > > that the coefficient estimates for the absorbed
> categories in -areg-
> > > are not present in -e(b)- (and the corresponding
> indicators are not
> > > present in the dataset).
> > >
> > > In the next ado-file update, -suest- will report an error message
> > > when used with -areg- (something it should have done from the
> > > start).
> > >
> > > Note that -suest- was not listed as a supported postestimation
> > > command after
> > > -areg- in [R] areg postestimation.
> > >
> > > --Jeff
> > > email@example.com
> > Jeff's comment offers a clue on how you might be able to
> proceed. A
> > fixed effects model can be estimated using OLS on
> transformed data.
> > The transformation is "demeaning", which is conveniently
> done by Ben
> > Jann's
> > -center- package. You might be able to do the following:
> > (1) Create demeaned variables for each of your fixed effect
> > The variables may differ from model to model because the samples on
> > which they are estimated may differ, hence the possible
> need to create
> > different sets of demeaned variables.
> > (2) Estimate the fixed effects models using OLS on the demeaned
> > variables.
> > (3) Do the degrees-of-freedom adjustment for the N fixed effects on
> > the var-cov matrix saved in e(V) by hand and repost using Ben's
> > -eret2- routine (I *think* this will work). The dof adjustment is
> > standard and is discussed in various textbooks as well as
> in the Stata
> > manual's entries for xtreg etc.
> > (4) Use -suest- to compare the coefficients.
> > Rather laborious, but I think it should work.
> > Hope this helps.
> > Cheers,
> > Mark
> > Prof. Mark Schaffer
> > Director, CERT
> > Department of Economics
> > School of Management & Languages
> > Heriot-Watt University, Edinburgh EH14 4AS tel
> +44-131-451-3494 / fax
> > +44-131-451-3296
> > email: firstname.lastname@example.org
> > web: http://www.sml.hw.ac.uk/ecomes
> > *
> > * 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:
* For searches and help try: