Statalist The Stata Listserver


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

Re: st: RE: how do i save the significance levels of coefficients after estimation?


From   "Ada Ma" <[email protected]>
To   [email protected]
Subject   Re: st: RE: how do i save the significance levels of coefficients after estimation?
Date   Tue, 18 Apr 2006 15:30:48 +0100

Hi Maarten,

Thanks for your help and suggestion.  For whatever reason it didn't
occur to me to search first before I ask.  Apologies to all for taking
up the bandwidth.

Ada

On 4/18/06, Maarten Buis <[email protected]> wrote:
> Ada:
> This has been asked before a number of times on the
> statalist. See for instance the thread started with
> http://www.stata.com/statalist/archive/2005-02/msg00476.html
> The corrected code of May is shown below.
> HTH,
> Maarten
>
> *-----------------begin example--------------------
> clear
>  sysuse auto
>  regress mpg len turn head gear
>  qui{
>  drop _all
>  mat b=e(b)'
>  mat se= vecdiag(cholesky(diag(vecdiag(e(V)))))'
>  gen vars=""
>  local names: rownames b
>  tokenize `names'
>  local num : word count `names'
>  set obs `num'
>  forvalues i=1/`num'{
>   replace vars= "``i''" in `i'
>  }
>  svmat b
>  svmat se
>  rename b1 coef
>  rename se1 se
>  gen t=coef/se
>  gen pvalue=2*ttail(e(df_r),abs(t))
>  gen lb=coef-invttail(e(df_r),0.025)*se
>  gen ub=coef+invttail(e(df_r),0.025)*se
>  }
>  list
> *-------------------------end example---------------------------
>
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
>
> visiting adress:
> Buitenveldertselaan 3 (Metropolitan), room Z214
>
> +31 20 5986715
>
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]On Behalf Of Ada Ma
> Sent: dinsdag 18 april 2006 15:48
> To: [email protected]
> Subject: st: how do i save the significance levels of coefficients after estimation?
>
> After estimating a wage model I would like to save the P values of the
> coefficients.  How can I do that?  I can't find the P values from the
> ereturn list.
>
>
>
> *
> *   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/
>


--
Ada Ma
Research Fellow
Health Economics Research Unit
University of Aberdeen, UK.
http://www.abdn.ac.uk/heru/
Tel: +44 (0) 1224 553863
Fax: +44 (0) 1224 550926

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