Post your code and log.
This is the same I posted in previous message. It is here again.
proc logistic data=pe.matchedata_21 desc;
strata group;
class CMV_ca_2_1 (ref='Absent')/param=ref bmicat (ref='Less than 25')/param=ref;
format CMV_ca_2_1 CMV_igg. bmicat bmicat.;
model PEstatus (event='1')= CMV_ca_2_1 bmicat;
exact CMV_ca_2_1 bmicat / estimate = both;
oddsratio cmv_ca_2_1 bmicat;
run;
153 proc logistic data=pe.matchedata_21 desc;
NOTE: Data file PE.MATCHEDATA_21.DATA is in a format that is native to another host, or
the file encoding does not match the session encoding. Cross Environment Data
Access will be used, which might require additional CPU resources and might reduce
performance.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
NOTE: The SAS System stopped processing this step because of errors.
154 strata group;
155 class CMV_ca_2_1 (ref='Absent')/param=ref bmicat (ref='Less than 25')/param=ref;
------
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, CODING, CPREFIX, DESC,
DESCENDING, LPREFIX, MISSING, ORDER, PARAM, REF, REFERENCE, TRUNCATE.
ERROR 76-322: Syntax error, statement will be ignored.
156 format CMV_ca_2_1 CMV_igg. bmicat bmicat.;
157 model PEstatus (event='1')= CMV_ca_2_1 bmicat;
158 exact CMV_ca_2_1 bmicat / estimate = both;
159 oddsratio cmv_ca_2_1 bmicat;
160 run;
And you didn't change your code... Why would I want to see the same code/log?
Change your code as indicated in my first answer, if that doesn't work post the code and log.
class CMV_ca_2_1 (ref='Absent') bmicat (ref='Less than 25')/param=ref;
As I mentioned earlier, it did not work. Here is the log:
161 proc logistic data=pe.matchedata_21 desc;
NOTE: Data file PE.MATCHEDATA_21.DATA is in a format that is native to another host, or
the file encoding does not match the session encoding. Cross Environment Data
Access will be used, which might require additional CPU resources and might reduce
performance.
162 strata group;
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
NOTE: The SAS System stopped processing this step because of errors.
163 class CMV_ca_2_1 (ref='Absent') bmicat (ref='Less than 25')/param=ref;
164 format CMV_ca_2_1 CMV_igg. bmicat bmicat.;
165 model PEstatus (event='1')= CMV_ca_2_1 bmicat;
166 exact CMV_ca_2_1 bmicat / estimate = both;
167 oddsratio cmv_ca_2_1 bmicat;
------
22
202
ERROR 22-322: Syntax error, expecting one of the following: ;, /.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
168 run;
Yes, but hopefully you'll notice it's a different error. You apparently have multiple errors but SAS stops at the first one.
I suggest reading the documentation regarding the oddsratio statement and try debugging some of these on your own.
From the documentation:
The CONTRAST, ESTIMATE, LSMEANS, LSMESTIMATE, ODDSRATIO, OUTPUT, ROC, ROCCONTRAST, SCORE, SLICE, STORE, TEST, and UNITS statements are not available with an exact analysis.
emphasis on exact added by me.
Thanks.
In addition I think it only takes a single variable at a time.
Hi Reeza,
I was able to perfrom multivariable analysis once I removed ODDSRATIO statemtn. It gave me exact estimates.
Thanks
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.