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,