BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Reeza
Super User

Post your code and log. 

wajmsu
Obsidian | Level 7

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;

Reeza
Super User

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. 

Reeza
Super User
class CMV_ca_2_1 (ref='Absent') bmicat (ref='Less than 25')/param=ref;
wajmsu
Obsidian | Level 7

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;

Reeza
Super User

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. 

ballardw
Super User

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.

wajmsu
Obsidian | Level 7

Thanks.

Reeza
Super User

In addition I think it only takes a single variable at a time. 

 

 

wajmsu
Obsidian | Level 7

Hi Reeza,

I was able to perfrom multivariable analysis once I removed ODDSRATIO statemtn. It gave me exact estimates.

Thanks

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 24 replies
  • 2867 views
  • 2 likes
  • 3 in conversation