Hi, I run a univariate logistic regression model where the independent variable is a nominal with >2 categories. I use survey data and Stata MP version 16.1. My aim is to extract the risk ratio (RR) of each category to the reference and a global p-value for these.
I use the nlcom command for that, however the p-values following the nlcom are quite contradicting to the 95%CIs. Eg. for ratio 2: RR=1.04; 95%CI =(0.51, 1.57); p-value<0.001. Am I doing something wrong, or why this contradiction? And can I trust that the global p-value=0.351 is correct?
I use the nlcom command for that, however the p-values following the nlcom are quite contradicting to the 95%CIs. Eg. for ratio 2: RR=1.04; 95%CI =(0.51, 1.57); p-value<0.001. Am I doing something wrong, or why this contradiction? And can I trust that the global p-value=0.351 is correct?
Code:
svy: logistic outcome i.cov (running logistic on estimation sample) note: 2.cov!= 0 predicts failure perfectly 2.cov dropped and 13 obs not used Survey: Logistic regression Number of strata = 1 Number of obs = 565 Number of PSUs = 565 Population size = 552.706152 Design df = 564 F( 2, 563) = 0.51 Prob > F = 0.5987 ------------------------------------------------------------------------------- | Linearized outcome | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval] --------------+---------------------------------------------------------------- cov| cov2 | 1 (empty) cov3 | .5865927 .3142127 -1.00 0.320 .2048348 1.679846 cov4 | 1.063686 .4331284 0.15 0.880 .4780377 2.366816 | _cons | .5334486 .0505784 -6.63 0.000 .4428056 .6426463 ------------------------------------------------------------------------------- Note: _cons estimates baseline odds. . margins cov, post Adjusted predictions Number of strata = 1 Number of obs = 565 Number of PSUs = 565 Population size = 552.706152 Model VCE : Linearized Design df = 564 Expression : Pr(outcome), predict() ------------------------------------------------------------------------------- | Delta-method | Margin Std. Err. t P>|t| [95% Conf. Interval] --------------+---------------------------------------------------------------- cov | cov1 | .3478751 .0215093 16.17 0.000 .3056269 .3901233 cov3 | .2383373 .0957039 2.49 0.013 .0503578 .4263168 cov4 | .3620096 .0914604 3.96 0.000 .1823649 .5416542 ------------------------------------------------------------------------------- . nlcom (ratio1: _b[3.cov] / _b[1.cov]) (ratio2: _b[4.cov] / _b[1.cov]), post ratio1: _b[3.cov] / _b[1.cov] ratio2: _b[4.cov] / _b[1.cov] ------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ratio1 | .6851231 .2783521 2.46 0.014 .139563 1.230683 ratio2 | 1.040631 .2706705 3.84 0.000 .5101263 1.571135 ------------------------------------------------------------------------------ . test _b[ratio1] = _b[ratio2] ( 1) ratio1 - ratio2 = 0 chi2( 1) = 0.87 Prob > chi2 = 0.3510
Comment