Statalist


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

st: RE: Curious missing scalar after regress postestimation


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: Curious missing scalar after regress postestimation
Date   Tue, 14 Oct 2008 10:59:02 +0200

Works for me when I try it with another example. 

*********
sysuse census, clear

tabulate region, gen(region)
regress death medage region2-region4 [aw=pop], noc vce(cluster  state)
scalar var_medage = _se[medage]
di var_medage
scalar est_medage = _coef[medage]
di est_medage
*********

Sure you do not do anything in between storing and -display-ing that erases
your -scalar-s? Why not use packages like -ssc d parmest- or Stata`s -
estimates store- for this purpose?

BTW, probably dangerous to call the standard error of the OLS estimator
"var_...". Could lead to misinterpretations down the road...


HTH
Martin


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Patrick P.
Phillips
Sent: Tuesday, October 14, 2008 10:44 AM
To: [email protected]
Subject: st: Curious missing scalar after regress postestimation

I am running some simulations including a regress command and have come
across some curiosities with scalars.

I run the following commands:

    regress beta alpha [aweight=prec], nocons vce(cluster trial)

    scalar var_alpha = _se[alpha]
    scalar est_alpha = _coef[alpha]
    scalar r_sqrd = e(r2)

When I type scalar list, I get the following:

. scalar list
    r_sqrd =  .09759686
 est_alpha =  .42516408
 var_alpha =  .48875057

But, when I try to display the contents of scalar var_alpha, it appears to
only contain '.':

. disp var_alpha
.

Any thoughts on why this is? It's driving me mad!

Many thanks for your help,

Patrick

______________________________

Patrick Phillips
Statistician
MRC Clinical Trials Unit
222 Euston Road
London NW1 2DA



Due to a severe system failure that occurred early Monday 22nd September
2008 we have been unable to recover externally received e-mails due to
having to perform a system restore.

Please could you resend any e-mails sent between Monday 3:00am and Wednesday
12:00 noon BST (GMT +1 hour)

We regret any inconvenience this may have caused.

MRC Euston Campus ICT Service Desk
****************************************************************************
*****
This communication is confidential and may contain privileged information
intended solely for the named recipient(s). It may not be used or disclosed
except for the purpose for which it has been sent. If you are not the
intended recipient, you must not copy, distribute, take any action or
reliance on it. If you have received this communication in error, do not
open any attachments but please notify the MRC Euston Campus ICT Service
Desk by e-mailing [email protected] quoting the sender details, and then
delete this message along with any attached files. E-mail messages are not
secure and attachments could contain software viruses which may damage your
computer system. Whilst every reasonable precaution has been taken to
minimise this risk, The MRC cannot accept any liability for any damage
sustained as a result of these factors. You are advised to carry out your
own virus checks before opening any attachments. Unless expressly stated,
opinions in this message are those of the!
  e-mail author and not of the Medical Research Council (MRC).
****************************************************************************
*****

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

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index