@csessa3 wrote:
It's a long story, but the gist is that I have a dataset of medical providers who are listed in multiple states within the dataset. I am going to use the dummy variables to calculate which state they are listed in the most to use this as their "primary" state.
So for example, if doctor A is listed in Florida 2 times and Georgia 1 time, I want to say he is a Florida doctor.
In a case like this, you shouldn't be solving it with dummy variables. Run a proc freq and get the top count per doctor.
proc freq data=have noprint;
table doctorID*state /out =doc_statecounts;
run;
proc sort data=doc_statecounts;
by doctorID descending count;
run;
proc sort data=doc_statecounts nodupkey out=doc_primarystate;
by doctorID;
run;
My first guess is, especially for the GLM modelling, is that the problem may not be the number of observations, but the number of unique values of STATE (or other class variables). But given you have not provided the glm model you are estimating (or the logistic) that's only a conjecture.
Do you know how many values of STATE you have? You program assumes it has only two values: 1 and 2. But SAS is telling you there is at least one other value. It could be a missing value, or a valid value.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.