- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have a response variable with six categories, 1 - 6.
SAS Version: TS1M6
I am analyzing the data using GLIMMIX:
PROC GLIMMIX ;
CLASS rep group size ;
MODEL size = group / DIST=MULT ;
RANDOM rep ;
OUTPUT OUT=new PRED(ILINK)=ps ;
SIZE has discrete values 1, 2, 3, 4, 5, 6.
When I previously used this code, the new SAS DATA set would have _LEVEL_ to identify which of the six levels of the categorical response variable the predicted cumulative probabilIty (ps) was associated with. Now, I am no longer getting the _LEVEL_ variable; just the observed value of SIZE. I want to make certain I align the correct value of SIZE with its cumulative probability for each group value.
Any assistance would be appreciated.
clg
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @clg2 and welcome to the SAS Support Communities (as a first-time poster)!
Sorry to see that your post hasn't been answered yet. Not sure if I can be of much help, but running your code using my SAS 9.4M5 (SAS/STAT 14.3) and this very crude input dataset HAVE
data have;
call streaminit(27182818);
do i=1 to 100;
group=rand('bern',0.5);
rep=rand('bern',0.5);
size=rand('integer',6);
output;
end;
run;
creates a dataset NEW which does contain variable _LEVEL_ with values 1 through 5 for each value of variable i, hence 500 observations in total. However, if I add the OBSCAT option to the OUTPUT statement
OUTPUT OUT=new1 PRED(ILINK)=ps / obscat;
the output dataset NEW1 is only a subset of NEW: comprised of those 75 observations where SIZE=_LEVEL_, and variable _LEVEL_ is omitted (as it would be redundant). This looks like what you describe.
As far as I see, the documentation of the OUTPUT statement has not changed between SAS/STAT 14.3 and 15.1. So I wouldn't know why your SAS 9.4M6 should work as if OBSCAT was the default. Do you get variable _LEVEL_ if you use the above HAVE dataset? If so, there might be a data-dependent issue and you may want to share a portion of your data (possibly with confidential values replaced with mock-up data).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content