BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kyla123
Fluorite | Level 6

I am trying to determine the Odds ratio of the association between the number of hpv shots and poverty status adjusting for age, race, and sex. we have grouped the number of shots by 0-1 and>=2 and using the poverty status Above Poverty >$75k as our reference. This is the code ive been trying to use but it gives me an error message of "invalid reference value for incpov1" and a syntax error for my event statement 

 

proc logistic data = puf.nisteenpuf19 descending;

class incpov1 (ref="Above Poverty >$75k") / param=ref;

model hpvi_group(event= "0-1" ">=2") = incpov1 age sex raceethk;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
I'm surprised Sex or Race are not also categorical variables in the CLASS statement.

Please show the actual log.

REF= value should be the formatted value and must match exactly. If you're not certain, run a PROC FREQ on the INCPOV1 variable and post that output.

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

What are the actual values (formatted) in your data set puf.nisteenpuf19? Did you type the ref= properly? Does it match exactly?

--
Paige Miller
Reeza
Super User
I'm surprised Sex or Race are not also categorical variables in the CLASS statement.

Please show the actual log.

REF= value should be the formatted value and must match exactly. If you're not certain, run a PROC FREQ on the INCPOV1 variable and post that output.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 421 views
  • 1 like
  • 3 in conversation