Hi guys,

I'm looking to see how several binary dependent variables (for eg. alcohol use yes/no coded as AlcoholFull) have changed over time in a group of people. Time points = bsl, 2 months and 12 months. The data is 3-level with repeat measures nested in students who are nested in schools. I also want to see how several explanatory predictors or covariates differ over time (gender and SES by time interactions)

There's individual and school level intercepts and a random slope for individuals.

Question 1: If time is linear, where 1=12 months would the correct syntax for this be:

meglm AlcoholFull c.Time i.T1_Gender_M_F##c.Time || SchoolCluster: || ContactID: Time, cov(unstructured) family(binomial) or

And then should I interpret the Odds ratio as OR per year!?

Question 2: the max likelihood estimates and AIC are saying the model is more parsimonious when time is quadratic (AIC differs by 15pts). In that case would the correct syntax be

meglm AlcoholFull c.Time##c.Time i.T1_Gender##c.Time || SchoolCluster: || ContactID: Time, family(binomial) link(logit) or

How do i interpret the results then!? I want to know A) how much alcohol has changed over time (i.e. has alcohol use increased or decreased) and B) whether females have had a greater change over time

Would it be ok to take time as linear given theory would say alcohol shouldn't change that much over 1 year in the age group of interest?

Question 3: if gender isn't significant over time, is it better to remove this from the model or ok to keep in!?

If anyone has any guidance that would be much appreciated. Or if there's a good trends paper using GLM that would be good to read please share