Hello,

I have a quick question on the command "marginsplot"

I have the following codes:

regress y x z c.x#c.z

sum z
return list
global effa = round(r(mean) + r(sd),0.1)
global eff = round(r(mean),0.1)
global effb = round(r(mean) - r(sd),0.1)

margins, at(x = 0(0.1)1) z = ($effa, $eff $effb))
marginsplot

All codes work fine until when i run marginsplot

I get the following error message: ") required" r(100);

My understanding per https://stats.idre.ucla.edu/stata/se...ions-stata/#s3 is that i can run margins command and then immediately follow up with marginsplot for a graph. However, i get a random error of ") required" - i was wondering if anyone had this issue and if so, how did you solve this?


Thank you