Dear All,
I'm trying to display ivqregress results by using the suite of commands -collect-. My outcome variable is categorized BMI then I have three equations in the model: Overweight, Obesity and Pathologic Obesity. These models have been fitted to four surveys and I want to display results with equations in the rows and surveys in the columns. I'm using the following code:
collect create iv_bmi, replace
collect _r_b _r_ci, tag(model[(ENFR2005)]): ivqregress smooth imc (i.ni_cat2inv = i.ingresocat) i.age_cat5 i.sexo i.hta i.dbt if enfr==2005, quantile(52 84 95)
collect _r_b _r_ci, tag(model[(ENFR2009)]): ivqregress smooth imc (i.ni_cat2inv = i.ingresocat) i.age_cat5 i.sexo i.hta i.dbt if enfr==2009, quantile(47 82 93)
collect dims
collect layout (coleq#colname) (results _r_b _r_ci)
and the table looks like this:
With the code the results are displayed one model after the other and I want one by side the other.
Can someone help me?
Thank you in advance
I'm trying to display ivqregress results by using the suite of commands -collect-. My outcome variable is categorized BMI then I have three equations in the model: Overweight, Obesity and Pathologic Obesity. These models have been fitted to four surveys and I want to display results with equations in the rows and surveys in the columns. I'm using the following code:
collect create iv_bmi, replace
collect _r_b _r_ci, tag(model[(ENFR2005)]): ivqregress smooth imc (i.ni_cat2inv = i.ingresocat) i.age_cat5 i.sexo i.hta i.dbt if enfr==2005, quantile(52 84 95)
collect _r_b _r_ci, tag(model[(ENFR2009)]): ivqregress smooth imc (i.ni_cat2inv = i.ingresocat) i.age_cat5 i.sexo i.hta i.dbt if enfr==2009, quantile(47 82 93)
collect dims
collect layout (coleq#colname) (results _r_b _r_ci)
and the table looks like this:
| Coefficient | 95% CI | ||
| q52 | |||
| Primary/High | School | 0.00 | |
| Graduated | 1.90 | 1.35 2.45 | |
| 0.00 | |||
| 30-39 | 2.00 | 1.84 2.16 | |
| 40-49 | 3.05 | 2.87 3.23 | |
| 50-59 | 3.53 | 3.33 3.73 | |
| 60 or > | 2.93 | 2.71 3.14 | |
| Male | 0.00 | ||
| Female | -2.13 | -2.24 -2.02 | |
| No | 0.00 | ||
| Yes | 1.56 | 1.38 1.74 | |
| No | 0.00 | ||
| Yes | 1.19 | 0.97 1.40 | |
| Intercept | 23.18 | 22.97 23.38 | |
| q84 | |||
| Primary/High | School | 0.00 | |
| Graduated | 0.28 | -0.69 1.25 | |
| 0.00 | |||
| 30-39 | 2.42 | 2.17 2.68 | |
| 40-49 | 3.75 | 3.45 4.04 | |
| 50-59 | 3.67 | 3.32 4.02 | |
| 60 or > | 2.43 | 2.08 2.77 | |
| Male | 0.00 | ||
| Female | -0.99 | -1.18 -0.80 | |
| No | 0.00 | ||
| Yes | 2.18 | 1.89 2.48 | |
| No | 0.00 | ||
| Yes | 1.96 | 1.57 2.35 | |
| Intercept | 27.41 | 27.06 27.77 | |
| q95 | |||
| Primary/High | School | 0.00 | |
| Graduated | -3.75 | -5.32 -2.17 | |
| 0.00 | |||
| 30-39 | 2.31 | 1.73 2.88 | |
| 40-49 | 3.09 | 2.47 3.72 | |
| 50-59 | 2.79 | 2.03 3.55 | |
| 60 or > | 0.78 | 0.07 1.48 | |
| Male | 0.00 | ||
| Female | 0.15 | -0.30 0.60 | |
| No | 0.00 | ||
| Yes | 2.65 | 1.97 3.33 | |
| No | 0.00 | ||
| Yes | 2.99 | 2.11 3.86 | |
| Intercept | 33.25 | 32.22 34.29 | |
| q47 | |||
| Primary/High | School | 0.00 | |
| Graduated | 1.74 | 0.80 2.67 | |
| 0.00 | |||
| 30-39 | 1.30 | 1.06 1.53 | |
| 40-49 | 1.54 | 1.30 1.78 | |
| 50-59 | 1.73 | 1.47 1.99 | |
| 60 or > | 1.55 | 1.28 1.83 | |
| Male | 0.00 | ||
| Female | -2.15 | -2.28 -2.02 | |
| No | 0.00 | ||
| Yes | 2.02 | 1.86 2.19 | |
| No | 0.00 | ||
| Yes | 1.46 | 1.21 1.71 | |
| Intercept | 23.62 | 23.22 24.02 | |
| q82 | |||
| Primary/High | School | 0.00 | |
| Graduated | 0.06 | -1.96 2.08 | |
| 0.00 | |||
| 30-39 | 1.70 | 1.34 2.07 | |
| 40-49 | 2.01 | 1.62 2.40 | |
| 50-59 | 2.06 | 1.65 2.48 | |
| 60 or > | 1.36 | 0.92 1.81 | |
| Male | 0.00 | ||
| Female | -0.81 | -1.00 -0.61 | |
| No | 0.00 | ||
| Yes | 2.48 | 2.23 2.74 | |
| No | 0.00 | ||
| Yes | 2.14 | 1.81 2.47 | |
| Intercept | 27.88 | 27.12 28.63 | |
| q93 | |||
| Primary/High | School | 0.00 | |
| Graduated | -1.89 | -3.77 -0.00 | |
| 0.00 | |||
| 30-39 | 1.55 | 0.83 2.28 | |
| 40-49 | 2.19 | 1.48 2.91 | |
| 50-59 | 2.17 | 1.42 2.92 | |
| 60 or > | 0.93 | 0.16 1.69 | |
| Male | 0.00 | ||
| Female | -0.02 | -0.37 0.33 | |
| No | 0.00 | ||
| Yes | 2.63 | 2.21 3.04 | |
| No | 0.00 | ||
| Yes | 2.51 | 1.79 3.22 | |
| Intercept | 31.67 | 30.58 32.75 | |
Can someone help me?
Thank you in advance

Comment