Thank you for the post entitled “Proc Logistics gone CRAZY!” This post noted that Proc GLIMMIX correctly identifies x1-x5 as insignificant in the following example:
data temp;
input Y N;
cards;
97870 270000
12890 55000
120071 313000
43446 150000
1405102 1903000
125402 254000
79192 109000
14087 29000
10714 9000
983775 1587000
316543 654000
8592 29000
76061 130000
217492 501000
132423 354000
29163 127000
57013 161000
82747 192000
101778 344000
44258 77000
;
run;
data temp;
call streaminit(123);
set temp;
x1=1-rand('BETA',3,0.1);
x2=rand('CAUCHY');
x3=rand('CHISQ',22);
x4=rand('ERLANG', 7);
x5=rand('EXPO');
x6=rand('F',12,322);
trial=_n_;
run;
proc glimmix data=temp method=laplace;
class trial;
model y/n=x1 x2 x3 x4 x5/solution chisq;
random intercept/subject=trial;
run;
My question is: Why are the df for x1-x5 all zero? It seems disconcerting to have zero df, but should it (be disconcerting)?
P.S. I'm using SAS 9.4 TS Level 1M3.
x1 has an issue with the way you build it:
I get this when I run your code:
NOTE: Argument 3 to function RAND('BETA',3,0.1) at line 419 column 6 is invalid.
So x1 is missing for every record.
And
432 proc glimmix data=temp method=laplace; 433 class trial; 434 model y/n=x1 x2 x3 x4 x5/solution chisq; 435 random intercept/subject=trial; 436 run; ERROR: Invalid or missing data.
So I don't see how you get any DF.
I'm using SAS 9.4 TS Level 1M4.
That's funny - it works fine for me. If you run it without trying to create x1 and taking x1 out of the predictors, do you get 0 df for x2-x5?
data temp;
input Y N;
cards;
97870 270000
12890 55000
120071 313000
43446 150000
1405102 1903000
125402 254000
79192 109000
14087 29000
10714 9000
983775 1587000
316543 654000
8592 29000
76061 130000
217492 501000
132423 354000
29163 127000
57013 161000
82747 192000
101778 344000
44258 77000
;
run;
data temp;
call streaminit(123);
set temp;
*x1=1-rand('BETA',3,0.1);
x2=rand('CAUCHY');
x3=rand('CHISQ',22);
x4=rand('ERLANG', 7);
x5=rand('EXPO');
x6=rand('F',12,322);
trial=_n_;
run;
proc glimmix data=temp method=laplace;
class trial;
model y/n= /*x1*/ x2 x3 x4 x5/solution chisq;
random intercept/subject=trial;
run;
I think the issue is that you have over-parameterized your model. With only 1 observation per subject, the random intercepts essentially exhausts your DF.
That explanation makes sense to me, and over-parameterization sounds bad. But this was the recommended solution to the earlier post (https://communities.sas.com/t5/SAS-Statistical-Procedures/Proc-Logistics-gone-CRAZY/td-p/146717). Was this solution maybe not so great an idea after all?
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!
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.