Sunday, January 01, 2006

RE: st: return of p-value for beta after regress command

At 05:20 PM 1/1/2006, Maarten buis wrote: >Hi Colin, > >Something like this was discussed a while ago on statalist: > > >HTH, >Maarten

Based on that message, this is an improvement on what I sent before:

* Run the regression first, then run this mat b = e(b) mat v = e(V) local k = colsof(b) mat t = J(1, `k', 0) mat p = J(1, `k', 0) local dfr = e(df_r)

forval j = 1/`k' { local t = b[1,`j'] / sqrt( v[`j', `j'] ) local p = 2*ttail(`dfr',abs(`t')) mat t[1,`j'] = `t' mat p[1,`j'] = `p' } mat list t mat list p

The main advantage of this is that the results are stored in matrices if you want them.

------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 FAX: (574)288-4373 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW (personal): WWW (department):

* * For searches and help try: * * *


Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?