Hi Stata members,
I have run the following program to run cross sectional regressions by country and it worked very well,
capture program drop one_year
program define one_year
local outcome spread
unab predictors: tangibility profitabilty secured guaranteed investment_grd size logmat rating corporatedefaultspread vix difference logamount
capture noisily regress `outcome' `predictors'
if c(rc) == 0 {
foreach p of local predictors {
gen b_`p' = _b[`p']
gen se_`p' = _se[`p']
}
gen n_obs = e(N)
gen r2 = e(r2)
exit 0
}
else if inlist(c(rc), 2000, 2001) {
exit 0
}
else {
foreach p of local predictors {
gen b_`p' = .x
gen se_`p' = .x
}
gen n_obs = .x
gen r2 = .x
exit c(rc)
}
end
runby one_year, by(country)
However, I need the P-value for the coefficients, and I have used return list but it did not return any value,
return list
matrix list r(table),
I also tried to calculate the P-value in excel using the T-Distribution function but it returned completely different values than Stata,
so I will appreciate any suggestions to get the p-values with the Stata output,
Thanks for your help,
Related Posts with r(table) with cross-sectional regression
STATA Gurus: Please check my first regression results and comment on them!Array Dear All, Could you please check my first regression results (attached the excel file) and com…
Random effect panel regression for Exchange rate's influence on exportsDear Community, I am new on this forum and hope to proceed in the correct way and according to rules…
Invalid Name Using ReplaceHello, I was trying to replace the value of some variables. My code is: replace a867_2900 = 375000…
Don't understand what marginsplot is doing.I have run a simple regression model followed by a request for margins as follows: Code: . regSco…
Create a categorical from several continuous variables?Hi all, Back with another simple question on variable creation that is nonetheless stumping me. I h…
Subscribe to:
Post Comments (Atom)
0 Response to r(table) with cross-sectional regression
Post a Comment