0
$\begingroup$

I am trying to simulate data using parameters from a glmer() model output. The model, which comes from a published paper, is as follows: DV ~ 1 + group* sex *verb type + trial number + (1 |participant) + (1 | stimulus). All three IVs (group, sex and verb type) comprise 2 levels and are deviation coded so that, for instance, female = -0.5 and male = 0.5. The DV is binary (success or failure)

I want to simulate the (log odds) probability of success for each trial for each participant, which I am calculating using the following formula (where group, sex and type are all deviation coded as in the original paper): b_intercept + (b_group * group) + (b_sex * sex) + (b_type * type) + (b_trial * trial_number) + (b_group_sex_type* group* sex* type) + (b_group_sex * group * sex) + (b_group_type * group * type) + (b_type_sex * type * sex) + random effect of participant + random effect of stimulus

But when it comes to the interaction terms in this calculation, the fact that the variables are deviation coded means I can't retrieve the specific value for each group because there are only two possible outputs and, for instance, a female (-0.5) in group 1 (-0.5) gives the same interaction term as a male (0.5) in group 2 (0.5).

In cases such as these, how do you accurately simulate data? Is there a way to incorporate the effects of interactions into your simulated IV?

$\endgroup$
1
  • $\begingroup$ Consider using tex equations in your questions $\endgroup$
    – mmikkelsen
    Nov 29 at 15:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.