Hello.
I am trying to create some doc/docx regression table output for each group of observations that has a given id number (variable name of the id number is "order"). Ideally, each table output would have as title the id or the given string variables from which the id number is generated. So far I have tried (with little success) the following code:
forval y = 1/`r(max)' {
regress y x1 x2...., vce(hc3) if order ==`i'
outreg2 using tryoutreg.doc, append ctitle(order)
}
In particular, stata does not accept the use of "if"...
Thank you. I have lost a lot of time without finding an appropriate solution, trying foreach, forval, and others.
Kind regards.
Related Posts with regressing group observations identified by id in loop and for each regression create a table output
Reshape from wide to long with multiple variablesHello everyone, Just trying to puzzle out how to reshape my dataset from wide format to long, but w…
How can I generate a list of variables using loop?I want to generate new variables a, c, d I tried the code Code: foreach i in "a" " c" "d " { ge…
How to test for differences in two WTP distributions using the complete combinatorial approachDear all, Does anyone know how to test for differences in two WTP distributions using the complete …
Scaling problems of the y-axis in marginsplot with multiple imputed dataDear all, I would like to make a marginsplot with multiple imputed data. See my syntax below. I am …
Graph STATA RR 95% CI with different colors and space between barsHello everybody, I am really struggling to create a graph in STATA that looks like the attached one…
Subscribe to:
Post Comments (Atom)
0 Response to regressing group observations identified by id in loop and for each regression create a table output
Post a Comment