BookmarkSubscribeRSS Feed
sdaniels429
Fluorite | Level 6

Hi, SAS experts,

 

I have a sample of individuals nested in different organizations. I want to look at the raw rate of having a binary outcome (Y) among this sample but adjusting for individuals clustered in organizations. Then calculating predicted probabilities of Y from the model for each individual. Below is my code. I got an error message requesting me to specify independent variables in the model statement. I'm wondering if it's possible to achieve what I want to do with Proc Glimmix?

 

Thank you in advance!

Sam

 

proc glimmix data=dataname  ;
 class orgID ;
 model Y / dist=bin link=logi ddfm=bw solution;
random intercept / subject = orgID;

output out=gmout pred=xbet pred (ilink)=predprob;
run;

2 REPLIES 2
ballardw
Super User

As an absolute minimum you need at least one independent variable for any sort of model, doesn't matter which procedure. Models are intended to predict values (dependent variable(s) ) based on the values of other variables (independent). If there are no independent variables what is the model supposed to use for input.

 

Are the "individuals" you are wanting to predict for based on some characteristic or just that they are present? How many times does each individual appear in your data? If only once then there isn't much to predict for those individuals.

sdaniels429
Fluorite | Level 6

Hi, @ballardw 

Thank you for your response!

There might be one record or 1+ records for one individual in two years. And they may have 2+ records because they may move between organizations. I think what I was mainly trying to do was to account for individuals clustered in different organizations because that may affect the outcome. Otherwise I could have just done a chi-square because I'm only comparing the raw outcome without adjusting for anything. Even there might be one individual with multiple records, that individual only experienced the outcome once (i.e. mortality).. Do you have suggestions on what I should do?

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 16. 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
  • 440 views
  • 0 likes
  • 2 in conversation