Skip to main content
Post Undeleted by frank
deleted 319 characters in body
Source Link
frank
  • 11.2k
  • 3
  • 21
  • 30

The term (1|company/ID) is shortcut for (1|company) + (1|company:ID). The term (1|company:ID) creates a random effects intercept for each combination of company and ID. But since each ID belongs only to one company, this is redundant. So, you could replace (1|company/ID) by (1|company) + (1|ID).

Since each participant takes only one training, I would suggest not using the ID variable at all and doing the following: since you are interested in the difference between OutcomeMean before and after the training, create a variable for this difference, call it diff and then use the formula

diff ~ (1 | company) + (1 | Training)

This gives you the "overall" random effect of company and the "overall" random effect for Training. If you want the random effects for each combination of company and Training, use this formula:

diff ~ (1 | Training:company)

The term (1|company/ID) is shortcut for (1|company) + (1|company:ID). The term (1|company:ID) creates a random effects intercept for each combination of company and ID. But since each ID belongs only to one company, this is redundant. So, you could replace (1|company/ID) by (1|company) + (1|ID).

Since each participant takes only one training, I would suggest not using the ID variable at all and doing the following: since you are interested in the difference between OutcomeMean before and after the training, create a variable for this difference, call it diff and then use the formula

diff ~ (1 | company) + (1 | Training)

This gives you the "overall" random effect of company and the "overall" random effect for Training. If you want the random effects for each combination of company and Training, use this formula:

diff ~ (1 | Training:company)

Since each participant takes only one training, I would suggest not using the ID variable at all and doing the following: since you are interested in the difference between OutcomeMean before and after the training, create a variable for this difference, call it diff and then use the formula

diff ~ (1 | company) + (1 | Training)

This gives you the "overall" random effect of company and the "overall" random effect for Training. If you want the random effects for each combination of company and Training, use this formula:

diff ~ (1 | Training:company)
Post Deleted by frank
Source Link
frank
  • 11.2k
  • 3
  • 21
  • 30

The term (1|company/ID) is shortcut for (1|company) + (1|company:ID). The term (1|company:ID) creates a random effects intercept for each combination of company and ID. But since each ID belongs only to one company, this is redundant. So, you could replace (1|company/ID) by (1|company) + (1|ID).

Since each participant takes only one training, I would suggest not using the ID variable at all and doing the following: since you are interested in the difference between OutcomeMean before and after the training, create a variable for this difference, call it diff and then use the formula

diff ~ (1 | company) + (1 | Training)

This gives you the "overall" random effect of company and the "overall" random effect for Training. If you want the random effects for each combination of company and Training, use this formula:

diff ~ (1 | Training:company)