sas >> Huge confidence interval in logistic regression

by flom » Tue, 11 May 2004 03:24:55 GMT


Apologies for cross-posting, but I have such good responses from both

We have data on 96 large metropolitan areas in the USA

The dependent variable is presence or absence of a syringe exchage; IVs
include percent MSM in the city, presence of an ACTUP chapter in the
city, and percent college educated (these were gotten by a stepwise
procedure, and YES, I know that's a bad idea, but this is not analysis
for my own project, and higher-ups insist.....)

For percent MSM, we are getting a huge confidence interval on the odds
ratio, something like 1.5 to 150. I thought this might be due to
outliers, we removed a couple, and it narrowed the CI only slightly. I
thought it might be due to collinearity, but the largest condition index
is only 14.

Any other ideas?

Thanks in advance, as always


sas >> Huge confidence interval in logistic regression

by DaDay » Tue, 11 May 2004 23:34:37 GMT

I have had problems like you describe with logistic regression when
either the collinearity of my predictors was unacceptably high, or when
the variance of my independent variable was close to 0.

With best regards,

David Day,
Education Research and Evaluation Consultant,
California Department of Education

Similar Threads

1. PROC LOGISTIC not printing confidence intervals: SOLVED (mostly)

2. calculating confidence intervals in proc logistic


I am trying to get an output data set from proc logistic containing the odd
ratio estimates and the confidence intervals for them.

The independent variable of interest has 4 classes so 3 of the classes are
compared with the benchmark class (in my case the lowest category).

According with SAS documentation, I was able to compute the odds-ratios for
the three parameters:




Where exposure3, exposure2, and exposure1 are the coefficients produced by
the logistic regression (my values are identical to the ones in the SAS

However, I do have problems computing the confidence intervals for these
odds ratios.

According to SAS documentation, it would be  = exp(coeff_j +/_  z*sqrt
(variance_j). And the variance is available in the output when using covout

I tried but I am getting totally different results.

Any help would be more than welcomed.

Thank you very much!

Cornel Lencar, MF

Data Analyst

School of Occupational and Environmental Hygiene, UBC

#340-2206 East Mall, Vancouver, BC V6T 1Z4

Phone: 604-822-0839


3. PROC LOGISTIC not printing confidence intervals: SOLVED

4. hazard ratios and confidence intervals for Cox regression

I estimated a model to see whether the effect of being in the
experimental group differed across sexes. I estimated a survival model
that included three for membership in the experimental
group (coded 1 if in experimental group and 0 if control), one for
being male (coded 0 if female and 1 if male) and one for the
interaction between male and experimental (created by multiplying the
two component variables together).  SAS produces the following

    Analysis of Maximum Likelihood Estimates

                              Parameter      Standard    Hazard
       Variable        DF      Estimate         Error     Ratio

       Experimental     1      -0.44800       0.58548     0.639
       male             1       0.32433       0.48552     1.383
       exp_male         1      -0.02854       0.63806     0.972

Question 1:  I know that the group difference isn't statistically
significant here, but is the effect of being in the experimental group
for males equal to   exp(-0.44800+-0.02854) and the effect of
experimental group membership for females equal to exp(-0.44800)?

Question 2:  If that's correct, then computing a 95% CI for the
females is easy.  What's necessary to compute the same CI for males? 
Does one have to use a formula for a linear combination of the two


Brad Smith
pbs (at) myrealbox (.) com

5. Confidence/Prediction Interval error w/ linear regression

6. Prediction Intervals for Logistic Regression

I working on a project that uses prediction intervals rather than
confidence intervals. From my linear models work I recall that the
sampling variance for a mean response of N variables is:

s2(y hat) = s2(b0) + X_1^2 s2(b1) + X_2^2 s2(b2) + X_3^2 s2(b3) + €€
X_n^2 s2(bn) + 2ov(bi , bj)

The variance for a new prediction  s2(y hat_new)  = s2(y hat)  + MSE

So far so good. But the problem I working on involves a prediction from
logistic regression.  In Hosmer & Lemeshow book, the sampling variance
for the logit is presented in the same way as for linear regression (as
given in the formula for s2(y hat) above).  But then how can I derive  s2
(y hat_new) when there is no MSE ?


Andrew Kramer

7. 95% Confidence Interval for rate=0

8. Superimposing confidence intervals on line graph

Is there a way in sas to superimpose confidence intervals on a line
Here is my code for the line graph:
symbol1 color=3Dblack interpol=3Djoin
        width=3D2 value=3Ddot;
symbol2 color=3Dblack interpol=3Djoin
        width=3D2 value=3Dcircle;

PLOT perc_opioid*year=3Dpattype;=20
plot2 cl_lower=3Dcl_upper;=20

I would like to have lines on either side of the dots to show confidence