Hello! We have data on students who are nested within colleges, and we’re using GLIMMIX to run a multi-level regression model to predict whether or not a student declares a certain major in their first year of college (outcome) based on whether or not they take that subject in high school (main predictor). This is what our GLIMMIX code looks like: proc glimmix data=&dsn method=laplace noclprint; class &class_var; model outcome_var (event=’1’) = &ivlist / cl dist=binary link=logit solution oddsratio; random intercept / subject=&subject_var type=vc solution cl; covtest / wald ; lsmeans &lsmeans_var / bylevel cl ilink ; run ; where: class_var includes a list of categorical covariates with reference groups specified ivlist includes the main predictor and all other covariates subject_var is the college code (second level/grouping variable) lsmeans_var includes a list of categorical variables like our main predictor, student’s gender, etc. We borrowed a majority of the syntax from page 4 of this PDF: https://support.sas.com/resources/papers/proceedings15/3430-2015.pdf. We have a couple of questions about understanding some of these options and whether they are appropriate for our situation: Is there a reason we should use method=laplace rather than the default method=rspl in our case? Should we use dist=binary because our outcome variable only has 2 outcomes (majored / didn’t major)? In what case would we use dist=binomial instead? We used the lsmeans statement because we want to get the average predicted probabilities of our outcome for each level of categorical variables in the list lsmeans_var. Does lsmeans assume reference values or grand mean values for all the other categorical covariates in the model when calculating marginal means? A small percentage of students declare the major, so does that make our sample unbalanced? Does bylevel help with this by calculating lsmeans for each group separately as opposed to using the entire sample size as the denominator when calculating predicted probabilities of lsmeans_var? Any help would be greatly appreciated!
... View more