/* Unadjusted OR from logistic regression HOSP*/
PROC LOGISTIC DATA= MB2;
CLASS VAR4(PARAM = REF REF = '1') VAR2 (PARAM = REF REF = '1')
VAR6 (PARAM = REF REF = '1') VAR10(PARAM = REF REF = '3');
MODEL VAR7(EVENT = '1') = VAR4;
RUN;
this is the unadjusted odds ratio code im running
its saying invalid reference value for VAR4
VAR4(PARAM = REF REF = '1')
It means you don't have a value of 1 for your Var4.
Run the following to see the values. I can't recall if it should be the formatted or unformatted value you include in the REF - the documentation does state which though.
proc freq data=mb2;
table var4;
run;
@Birdsong32 wrote:
/* Unadjusted OR from logistic regression HOSP*/
PROC LOGISTIC DATA= MB2;
CLASS VAR4(PARAM = REF REF = '1') VAR2 (PARAM = REF REF = '1')
VAR6 (PARAM = REF REF = '1') VAR10(PARAM = REF REF = '3');
MODEL VAR7(EVENT = '1') = VAR4;
RUN;this is the unadjusted odds ratio code im running
its saying invalid reference value for VAR4
Should i change my variable name?
if so, how do i go by doing so?
If VAR4 has an associated format, then you need to specify the formatted value. And I strongly advise against including variables in the CLASS statement that are not also used in the MODEL statement. Any observation with a missing value on any of those unused variables will be omitted from the model fitting process, so you could end up using fewer observations than possible.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.