Hi all,

I've read the manual and Richard's guide about margins command, but could not understand some concepts.

I'm fitting a Linear Mixed Model to predict human's movement acceleration measured over a month. I want to identify differences on predictors by different periods of the day (morning/afternoon) according to sex and age.

The equation looks like:

Code:
mixed acceleration day_period##sex##c.predictor day_period##c.age##c.predictor || ID: R.day_period || date: R.day_period, residuals(ar 1, t(day_period))
To test the day_period##c.predictor effects for men and women, I wrote this command:

Code:
contrast day_period#c.predictor@sex, effects asobserved
But for a clear report for men and women, I am presenting marginal effects, since there's two three way interactions, with the same contrast.

Code:
margins day_period#i.sex, dydx(c.predictor) asobserved
margins day_period@.sex, dydx(c.predictor) contrast(effects) asobserved
The SE are really close when comparing "contrast" with "margins, contrast" but not the same, why this is happening? According to the manual, the "contrast" command is applied on the marginal effects.

Any help?