I am trying to calculate predicted values but the margins command and mcp command produce the different values. For example, according to the margins command, when control=1, the predicted value is 0.0035953 but according to the mcp graph, it is over 0.04. Also, when control=6, the margins command produces 0.0075143 while the mcp graph indicates over 0.008.
I used the following commands.
margins, at ( control = (1 (1) 6)) atmeans expression(invlogit(predict(xb)))
mcp control , margopts(expression(invlogit(predict(xb))))
Could anyone explain what is going on? Thank you!


I used the following commands.
margins, at ( control = (1 (1) 6)) atmeans expression(invlogit(predict(xb)))
mcp control , margopts(expression(invlogit(predict(xb))))
Could anyone explain what is going on? Thank you!
Comment