Putting q1 through q32 in the class statement is one way of doing this, but a better way would be to restructure your data so that the variable 'question' took on the values 1, 2, 3, ... , 31, 32. Currently, I envision your data to look something like this for each line:
idschool idstud itsex tech event q1 q2 q3 ... q32
In this case, idschool has multiple levels as does idstud. Itsex has 2 levels (presumably), event has 2 levels, tech has 2 levels (for the sake of illustration) and q1 through q32 each have 2 levels, such that for school=6 and student=100 who is male and had events for question 1, 30 and 32, the data would look like:
6 100 M 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
or something along those lines. What I would suggest is a "long" version for variables idschool, idstud itsex tech question event:
6 100 M 1 1 1
6 100 M 1 2 0
6 100 M 1 3 0
<keeps repeating to >
6 100 M 1 29 0
6 100 M 1 30 1
6 100 M 1 31 1
6 100 M 1 32 0
With your data structured in this format, your GLIMMIX code would simplify to:
proc glimmix data=final_clean method=laplace;
class idschool idstud itsex tech question;
model response (Event='1')=itsex|tech|question
/ Dist=Binary link=logit solution noint ;
random intercept / subject=idschool type=vc;
random intercept / subject=idstud(idschool) type=vc;
lsmeans itsex*tech*question/ilink;
run;
The lsmeans statement will yield 128 probabilities. Down near the bottom of each sex by tech section, there will be an estimate for Question 30.
Now if you want to compare these values, see the many posts by @StatDave regarding the use of the %NLmeans macro to get the differences. The documentation for the %NLmeans macro is in this note: https://support.sas.com/kb/62/362.html
SteveDenham
... View more