I created a postfile and now trying to display the results from that postfile. There are two variables in the postfile, "var" which is a string and contains the name of variable from univariate logistic regression and "pval" which is a float and contains the p-value for that regression. I am trying to display the output in a specific way and therefore created a new variable which should enable a loop to run however I am only getting output from the first line and no subsequent entries. Would appreciate help with my logic/syntax...
gen n = _n
forvalues i = 1/10 {
if n == `i' {
local vname = var
local p = pval
disp "`vname' " _col(10) "(p=" %4.3f "`p')"
}
}
Related Posts with For-loops are killing me!
xtcloglog population averaged vs. random effectsHi Statalist, I would like to estimate a complementary loglog model with induvidual effects using S…
Reassign variable valuesI would like to record the responses of the adult females (n_female) in the household in sequence i.…
Regression for event studyHello, I am analyzing the correlation between market cap and abnormal returns of targeted M&A fi…
Showing country-specific treatment effectsHello, I'm currently working with a dataset with individual respondents. In my analysis, I show the…
coefficient of logithi every one please i have an issue when i run logistic or logit command the coefficient comes out o…
Subscribe to:
Post Comments (Atom)
0 Response to For-loops are killing me!
Post a Comment