Dear Stata users,
I am a fellow in neonatology.
My knowledge in statistics is not very deep and I am quite new to Stata, trying to learn upon a previous output generated by a statistician of my hospital, so please apologize if my words are not correct.
I am analyzing a database of neonatal and maternal data, with the goal of establishing if there is a correlation between the different grades and stages of intrauterine inflammation (chorioamnionitis and funisitis in placental pathology) and neonatal adverse outcomes.
I am running linear (using xtreg command) and logistic (using logit command) analysis on the variables, stratifying according to grade/stage of inflammation and adjusting for different variables as gestational age and birth weight (I know that gestational age in this case could be a collider, I had long and useful discussion with my statistician
but definitely the world of neonatologists still adjusts for gestational age, and so I do by now).
This is an example of output for linear regression, adjusted for e.g. (gestational age):
Summary for variables: apgar1
by categories of: totstage (totstage)
totstage | N min p50 mean max sd
---------+------------------------------------------------------------
0 | 668.0 0.0 8.0 7.3 10.0 1.8
1 | 73.0 0.0 8.0 6.9 9.0 2.1
2 | 34.0 1.0 5.5 5.5 9.0 2.2
3 | 26.0 1.0 5.0 4.8 9.0 2.5
---------+------------------------------------------------------------
Total | 801.0 0.0 8.0 7.1 10.0 2.0
----------------------------------------------------------------------
i.totstage _Itotstage_0-3 (naturally coded; _Itotstage_0 omitted)
Random-effects ML regression Number of obs = 801
Group variable: bracciale1 Number of groups = 600
Random effects u_i ~ Gaussian Obs per group: min = 1
avg = 1.3
max = 3
LR chi2(4) = 257.10
Log likelihood = -1520.6991 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
apgar1 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Itotstage_1 | -.0199738 .2049183 -0.10 0.922 -.4216063 .3816588
_Itotstage_2 | -.5320909 .2998786 -1.77 0.076 -1.119842 .0556604
_Itotstage_3 | -1.070005 .3376757 -3.17 0.002 -1.731837 -.4081724
eg | .3592327 .0230176 15.61 0.000 .3141191 .4043463
_cons | -4.319941 .7449413 -5.80 0.000 -5.779999 -2.859883
-------------+----------------------------------------------------------------
/sigma_u | .7995537 .1466053 .5581774 1.14531
/sigma_e | 1.418514 .0794971 1.270955 1.583205
rho | .2411064 .0848319 .1081827 .4328017
------------------------------------------------------------------------------
Likelihood-ratio test of sigma_u=0: chibar2(01)= 7.06 Prob>=chibar2 = 0.004
This is an example of output for logistic regression (this time adjusted for 4 confounders, gestational age, bw, SGA and steroids use):
i.totstage _Itotstage_0-3 (naturally coded; _Itotstage_0 omitted)
Logistic regression Number of obs = 805
Wald chi2(7) = 124.86
Prob > chi2 = 0.0000
Log pseudolikelihood = -135.21677 Pseudo R2 = 0.4014
(Std. Err. adjusted for 602 clusters in bracciale1)
--------------------------------------------------------------------------------
| Robust
ivh | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
---------------+----------------------------------------------------------------
_Itotstage_1 | .8225153 .376481 -0.43 0.669 .3353765 2.017229
_Itotstage_2 | 1.120536 .6718614 0.19 0.849 .345983 3.629085
_Itotstage_3 | 1.144978 .798461 0.19 0.846 .2918798 4.491489
eg | .662688 .0800413 -3.41 0.001 .5229962 .8396912
bw | .998587 .0008331 -1.69 0.090 .9969554 1.000221
agasgafenton03 | .5515735 .2948085 -1.11 0.266 .1934852 1.572385
steroidi | 1.290917 .6427349 0.51 0.608 .486512 3.425336
_cons | 103420 270176.6 4.42 0.000 617.8858 1.73e+07
--------------------------------------------------------------------------------
My question is: which test can I run to say "there is/there is not a linear trend in each outcome (e.g. apgar1 or ivh) from _Itotstage_1 to _itotstage_3 ? ".
In other words, it is enough to run the regression models and use the Wald chi2 as a trend indicator, or do I have to run other post-regression tests?
I am trying with _nptrend and _tabodds commands, but I am not sure if it is correct to use them after regression analysis. besides, using _tabodds for generating Mantel-Haenszel odds ratios I am having troubles when trying to adjust for more than 1 variable (in my case, 4 variables, with a nonsense output).
Thank you very much for the time you can dedicate me!
Carlo
I am a fellow in neonatology.
My knowledge in statistics is not very deep and I am quite new to Stata, trying to learn upon a previous output generated by a statistician of my hospital, so please apologize if my words are not correct.
I am analyzing a database of neonatal and maternal data, with the goal of establishing if there is a correlation between the different grades and stages of intrauterine inflammation (chorioamnionitis and funisitis in placental pathology) and neonatal adverse outcomes.
I am running linear (using xtreg command) and logistic (using logit command) analysis on the variables, stratifying according to grade/stage of inflammation and adjusting for different variables as gestational age and birth weight (I know that gestational age in this case could be a collider, I had long and useful discussion with my statistician

This is an example of output for linear regression, adjusted for e.g. (gestational age):
Summary for variables: apgar1
by categories of: totstage (totstage)
totstage | N min p50 mean max sd
---------+------------------------------------------------------------
0 | 668.0 0.0 8.0 7.3 10.0 1.8
1 | 73.0 0.0 8.0 6.9 9.0 2.1
2 | 34.0 1.0 5.5 5.5 9.0 2.2
3 | 26.0 1.0 5.0 4.8 9.0 2.5
---------+------------------------------------------------------------
Total | 801.0 0.0 8.0 7.1 10.0 2.0
----------------------------------------------------------------------
i.totstage _Itotstage_0-3 (naturally coded; _Itotstage_0 omitted)
Random-effects ML regression Number of obs = 801
Group variable: bracciale1 Number of groups = 600
Random effects u_i ~ Gaussian Obs per group: min = 1
avg = 1.3
max = 3
LR chi2(4) = 257.10
Log likelihood = -1520.6991 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
apgar1 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Itotstage_1 | -.0199738 .2049183 -0.10 0.922 -.4216063 .3816588
_Itotstage_2 | -.5320909 .2998786 -1.77 0.076 -1.119842 .0556604
_Itotstage_3 | -1.070005 .3376757 -3.17 0.002 -1.731837 -.4081724
eg | .3592327 .0230176 15.61 0.000 .3141191 .4043463
_cons | -4.319941 .7449413 -5.80 0.000 -5.779999 -2.859883
-------------+----------------------------------------------------------------
/sigma_u | .7995537 .1466053 .5581774 1.14531
/sigma_e | 1.418514 .0794971 1.270955 1.583205
rho | .2411064 .0848319 .1081827 .4328017
------------------------------------------------------------------------------
Likelihood-ratio test of sigma_u=0: chibar2(01)= 7.06 Prob>=chibar2 = 0.004
This is an example of output for logistic regression (this time adjusted for 4 confounders, gestational age, bw, SGA and steroids use):
i.totstage _Itotstage_0-3 (naturally coded; _Itotstage_0 omitted)
Logistic regression Number of obs = 805
Wald chi2(7) = 124.86
Prob > chi2 = 0.0000
Log pseudolikelihood = -135.21677 Pseudo R2 = 0.4014
(Std. Err. adjusted for 602 clusters in bracciale1)
--------------------------------------------------------------------------------
| Robust
ivh | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
---------------+----------------------------------------------------------------
_Itotstage_1 | .8225153 .376481 -0.43 0.669 .3353765 2.017229
_Itotstage_2 | 1.120536 .6718614 0.19 0.849 .345983 3.629085
_Itotstage_3 | 1.144978 .798461 0.19 0.846 .2918798 4.491489
eg | .662688 .0800413 -3.41 0.001 .5229962 .8396912
bw | .998587 .0008331 -1.69 0.090 .9969554 1.000221
agasgafenton03 | .5515735 .2948085 -1.11 0.266 .1934852 1.572385
steroidi | 1.290917 .6427349 0.51 0.608 .486512 3.425336
_cons | 103420 270176.6 4.42 0.000 617.8858 1.73e+07
--------------------------------------------------------------------------------
My question is: which test can I run to say "there is/there is not a linear trend in each outcome (e.g. apgar1 or ivh) from _Itotstage_1 to _itotstage_3 ? ".
In other words, it is enough to run the regression models and use the Wald chi2 as a trend indicator, or do I have to run other post-regression tests?
I am trying with _nptrend and _tabodds commands, but I am not sure if it is correct to use them after regression analysis. besides, using _tabodds for generating Mantel-Haenszel odds ratios I am having troubles when trying to adjust for more than 1 variable (in my case, 4 variables, with a nonsense output).
Thank you very much for the time you can dedicate me!
Carlo
Comment