Quantcast
Channel: The Stata Blog - Latest Comments
Viewing all articles
Browse latest Browse all 1125

Re: How to successfully ask a question on Statalist

$
0
0

Hey everyone, I have a bit of trouble with plotting my continuous interactions using the marginsplot command after xt logit. The coefficient for the interaction comes up positive, but when I use margins and then marginsplot, the actual graph indicates a negative effect, whcih is quite confusing. Variables are coded correctly, I have checked that. I presume it must be a flaw in my margins command. I use:

margins, predict(pu0) at(var1=(x (x) x) var2=(x (x) x))

I have also tried:

margins c.var1#c.var2

But Stata gives me an error message 'variable c1 not found r(111)'

Any suggestions are very much appreciated. Thanks very much in advance for your help with this.


Viewing all articles
Browse latest Browse all 1125

Trending Articles