Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: test for trend


From   "Visintainer, Paul" <[email protected]>
To   <[email protected]>
Subject   st: RE: test for trend
Date   Tue, 7 Jun 2005 14:14:33 -0400

One approach to the problem with the adjusted trend is to start with the
command -tabodds-.  -tabodds- provides a score test for trend that may
be adjusted for categorical variables.  Your logistic model will provide
very nearly the same result as -tabodds-, as shown below:

This is an univariate analysis of age on low birthweight (low), using
data from Hosmer and Lemeshow's, 2000.  Age has been categorized into 4
levels (1-4).

.tabodds low agecat

------------------------------------------------------------------------
--
    agecat  |      cases     controls       odds      [95% Conf.
Interval]
------------+-----------------------------------------------------------
--
          1 |         15           36    0.41667        0.22814
0.76099
          2 |         20           36    0.55556        0.32162
0.95966
          3 |         15           21    0.71429        0.36823
1.38558
          4 |          9           37    0.24324        0.11740
0.50397
------------------------------------------------------------------------
--
Test of homogeneity (equal odds): chi2(3)  =     5.32
                                  Pr>chi2  =   0.1501

Score test for trend of odds:     chi2(1)  =     0.70
                                  Pr>chi2  =   0.4012



And here is the logistic command:

. logit low agecat

output:

Logistic regression             Number of obs   =   189
                                LR chi2(1)      =   0.71
                                Prob > chi2     =   0.3990
Log likelihood = -116.98033     Pseudo R2       =     0.0030

------------------------------------------------------------------------
-
low    | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------+----------------------------------------------------------------
agecat |   .8885542   .1249163    -0.84   0.401     .6745573     1.17044
------------------------------------------------------------------------
-




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index