Alex Cavallo <[email protected]> asks about saved results after -svylc-:
> I am trying to save results from svylc to a postfile.  I want to save the
> p-value and confidence interval but they are not returned.
> 
> Here is an example after svyreg:
> 
> . svylc somecoll-assoc
> 
>  ( 1)  somecoll - assoc = 0.0
> 
> ------------------------------------------------------------------------------
>       lnw_1Q |      Coef.    Std. Err.      t    P>|t|    [95% Conf.
> Interval]
> -------------+----------------------------------------------------------------
>          (1) |  -.2330609    .0158403   -14.71   0.000   -.2642388
> -.201883
> ------------------------------------------------------------------------------
> 
> . return li
> 
> scalars:
>               r(deft) =  1.06410465228278
>               r(deff) =  1.132318711009857
>              r(N_psu) =  574
>           r(N_strata) =  287
>                 r(se) =  .0158403258907145
>                r(est) =  -.2330608993356358
> 
> I can save the estimate and std error to scalars and compute the t-stat,
> but I need the right df to get the p-value.
> 
> What are the degrees of freedom for the t test in svylc?  Is there an
> adjustment for strata/PSUs?
I'm assuming Alex is using Stata 7, but the following discussion is also true
for Stata 8:
The degrees of freedom are:
	df = r(N_strata) - r(N_psu)
Thus the p-value is:
	pval = 2*( ttail(df, abs( r(est)/r(se) ) )
and the 95% confidence limits are:
	LL = r(est) - r(se)*invttail(df, 0.025)
	UL = r(est) + r(se)*invttail(df, 0.025)
--Jeff
[email protected]
*
*   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/