Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: P-value from regression
From
Eduardo Nunez <[email protected]>
To
[email protected]
Subject
st: P-value from regression
Date
Wed, 8 Dec 2010 13:20:18 -0500
Hello Statalisters,
I need to estimate the p-value from several linear regression
analyses. I am using a loop to automate the process.
--------------------------------------------------------------------------------------------------------------------------------------------------------
use "E:\Users\Eduardo\Desktop\Ivan Project\Ivan_data.dta"
tempname hdle
capt erase info.dta
postfile `hdle' str10 var sr_25p sr_50p sr_75p af_25p af_50p af_75p
pval using info
foreach var of varlist acordeA2B2 acordeA2C2 acordeA2D2 acordeB2C2
acordeB2D2 acordeC2D2 acordeA3B3 acordeA3B3 acordeA3C3 {
sum score if !`var', d
loc sr_50p=r(p50)
loc sr_25p=r(p25)
loc sr_75p=r(p75)
sum score if `var', d
loc af_50p=r(p50)
loc af_25p=r(p25)
loc af_75p=r(p75)
regress score `var', vce(cluster subject)
local pval=r(???)
post `hdle' ("`var'") (`sr_25p') (`sr_50p') (`sr_75p')
(`af_25p') (`af_50p') (`af_75p') (`pval')
}
postclose `hdle'
use info, clear
list, abbrev(12) noobs sep(0)
--------------------------------------------------------------------------------------------------------------------------------------------------------
typing "ereturn list" after regress doesn't provide the p-value
How should I calculate based en the ereturn values shown?
I have Stata 11.1
Thank you in advance,
Eduardo
*
* 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/