BookmarkSubscribeRSS Feed
mlien89
Calcite | Level 5

I am relatively new to performing glimmix procedures, and I am wanting to carry out a multinomial analysis for the following dataset, and perform a power analysis. I am receiving a syntax error shown below. I've attached my code for reference. any debugging would be appreciated!

 

mlien89_0-1636927888893.png

 

 

 

data idc;
input line $ seeding @@;
fields=15;
n=40;
do idc='none','mild','mod','sevr';
	input p @@;
	do field_id=1 to fields;
        ptst=((n*p)/100);
		mu=round(ptst,1.0);
		output;
	end;
end;
datalines;
S 25 5 17 25 53 
S 50 8 13 32 48
S 150 14 22 19 45
R 25 8 60 21 11 
R 50 15 64 14 7 
R 150 18 70 6 6 
;
proc print;
run;
proc glimmix data=idc;
class line seeding field_id;
freq mu;
model idc (order=data)=line|seeding/link=cumlogit htype=1,3 dist=multinomial s;
random intercept/field_id;
ods output tests3=a;
parms (.12)/hold=1;
  estimate 'No IDC line=S seeding=25' intercept 1 line 0 1 seeding 1 0 0 line*seeding 0 0 0 1 0 0,
           'No IDC line=S seeding=50' intercept 1 line 0 1 seeding 0 1 0 line*seeding 0 0 0 0 1 0, 
           'No IDC line=S seeding=150' intercept 1 line 0 1 seeding 0 0 1 line*seeding 0 0 0 0 0 1, 
           'No IDC line=R seeding=25' intercept 1 line 1 0 seeding 1 0 0 line*seeding 1 0 0 0 0 0,
           'No IDC line=R seeding=50' intercept 1 line 1 0 seeding 0 1 0 line*seeding 0 1 0 0 0 0, 
           'No IDC line=R seeding=150' intercept 1 line 1 0 seeding 0 0 1 line*seeding 0 0 1 0 0 0, 
           / ilink;
  estimate 'No+Mild IDC line=S seeding=25' intercept 0 1 line 0 1 seeding 1 0 0 line*seeding 0 0 0 1 0 0,
           'No+Mild IDC line=S seeding=50' intercept 0 1 line 0 1 seeding 0 1 0 line*seeding 0 0 0 0 1 0, 
           'No+Mild IDC line=S seeding=150' intercept 0 1 line 0 1 seeding 0 0 1 line*seeding 0 0 0 0 0 1, 
           'No+Mild IDC line=R seeding=25' intercept 0 1 line 1 0 seeding 1 0 0 line*seeding 1 0 0 0 0 0,
           'No+Mild IDC line=R seeding=50' intercept 0 1 line 1 0 seeding 0 1 0 line*seeding 0 1 0 0 0 0, 
           'No+Mild IDC line=R seeding=150' intercept 0 1 line 1 0 seeding 0 0 1 line*seeding 0 0 1 0 0 0, 
           / ilink;
  estimate 'yg1+2+4 t=40' intercept 0 0 1 trt 1 0,
           'yg1+2+4 t=80' intercept 0 0 1 trt 0 1 0, 
           'yg1+2+4 t=100' intercept 0 0 1 trt 0 0 1 0,
           'yg1+2+4 t=120' intercept 0 0 1 trt 0 0 0 1 0,
           'yg1+2+4 t=160' intercept 0 0 1 trt 0 0 0 0 1 / ilink;
  estimate 'yg1+2+4+5 t=40' intercept 0 0 0 1 trt 1 0,
           'yg1+2+4+5 t=80' intercept 0 0 0 1 trt 0 1 0, 
           'yg1+2+4+5 t=100' intercept 0 0 0 1 trt 0 0 1 0,
           'yg1+2+4+5 t=120' intercept 0 0 0 1 trt 0 0 0 1 0,
           'yg1+2+4+5 t=160' intercept 0 0 0 1 trt 0 0 0 0 1 / ilink;
run;
data power;
set a;
alpha=0.05;
fcrit=finv(1-alpha, numdf, dendf, 0);
power=1-probf(fcrit, numdf, dendf, numdf*fvalue);
run;
proc print;
run;  

 

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

 

[ I moved this post to Statistical Procedures board ]

 

Without even studying your model, I can already say you cannot specify a variable-name as an option behind the forward slash (/) in the RANDOM statement.

If this variable of yours is identifying the subjects in the model, then specify :

SUBJECT= (Identifies the subjects in the model)

followed by your variable name.

 

Koen

SteveDenham
Jade | Level 19

I recommend looking into using LSMESTIMATE statements rather than ESTIMATE statements - the syntax is much more compact and intuitive.

 

SteveDenham

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!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 415 views
  • 0 likes
  • 3 in conversation