comp.soft-sys.sas - The SAS statistics package.
Hi, 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: ref_vs_3=round(exp(2*&exposure.3+&exposure.2+&exposure.1),.001); ref_vs_2=round(exp(&exposure.1+2*&exposure.2+&exposure.3),.001); ref_vs_1=round(exp(&exposure.3+&exposure.2+2*&exposure.1),.001); Where exposure3, exposure2, and exposure1 are the coefficients produced by the logistic regression (my values are identical to the ones in the SAS output). 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 option. 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 E-mail: XXXX@XXXXX.COM
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 variables...one 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 coefficients. 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 coefficients? Thanks, Brad Smith pbs (at) myrealbox (.) com
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 ? Thanks! Andrew Kramer
Is there a way in sas to superimpose confidence intervals on a line graph.=20 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; PROC GPLOT DATA=3Dplotdata; PLOT perc_opioid*year=3Dpattype;=20 plot2 cl_lower=3Dcl_upper;=20 run; I would like to have lines on either side of the dots to show confidence intervals.