Hello,

I am trying to run average marginal effects for my dependent variable "renstu". The model is multi-level by the school attended (sch_id). The data is already xtset and is imputed for missing variables. The "program" I am using is one extracted from a non-multi-level model, so I am wondering if the programming is wrong for a multi-level model?

program myprog1

xtlogit ftemp renstu3 i.artstotal i.sportstotal i.race i.gender c.ses ///
c.overstd c.gpa10 i.remedial i.apibcourse c.collres i.colltesta i.stuexp1 ///
i.parexp1 c.paracad i.famcomp ///
i.schctrl i.region c.schszln c.stdschool c.sesschool if f10!=1, re
margins, dydx(renstu3)
end
mi estimate, cmdock: myprog1
Once running the command, Stata responds with

varlist specification required
Any help is appreciated and this is on Stata 15.1.

Mitch