HLM Simulation

#1
Hello dear people,

I have a question and hope you can help me. I am new in R and would like to simulate some data to practice. I would like to design a HLM, but I am overwhelmed at the moment.

I would like to simulate the following scenario: Suppose I want to measure the development of burnout in a company. My predictor for this is the general attachment style of the employees. So the thesis is that the attachment style (anxiety / avoidance) predicts the development of burnout at the workplace. Both values are recorded by questionnaire. I would now like to work with a nested structure.

Say we have 300 employees and 20 managers.

I would now like to examine the following hypothesis: The general characteristics of the attachment dimension "Avoiding" of supervisors predicts the burnout risk of employees. The higher the attachment avoidance among managers, the higher the risk of burnout among subordinates with anxious attachment style.

How can I do this? I have no idea. But I would like to understand how to do it.

Suppose I define the variables as follows and I want to achieve a great effect:
n = 300
n1= 20

Employee's fear of commitment to supervisor
attach_Cowork <- rnorm(n, mean = 3.56, sd = 1.12)

Avoidance of attachment Supervisor to employee
attach_avoi_SV <- rnorm(n1, mean = 2.92, sd = 1.19)

DV:
exhaustion <- rnorm(n, 22.19, 9.53)

What do I have to do? Can you help me?

Thanks a lot, Tom.
 

spunky

Doesn't actually exist
#2
Hello dear people,

I have a question and hope you can help me. I am new in R and would like to simulate some data to practice. I would like to design a HLM, but I am overwhelmed at the moment.

I would like to simulate the following scenario: Suppose I want to measure the development of burnout in a company. My predictor for this is the general attachment style of the employees. So the thesis is that the attachment style (anxiety / avoidance) predicts the development of burnout at the workplace. Both values are recorded by questionnaire. I would now like to work with a nested structure.

Say we have 300 employees and 20 managers.

I would now like to examine the following hypothesis: The general characteristics of the attachment dimension "Avoiding" of supervisors predicts the burnout risk of employees. The higher the attachment avoidance among managers, the higher the risk of burnout among subordinates with anxious attachment style.

How can I do this? I have no idea. But I would like to understand how to do it.

Suppose I define the variables as follows and I want to achieve a great effect:
n = 300
n1= 20

Employee's fear of commitment to supervisor
attach_Cowork <- rnorm(n, mean = 3.56, sd = 1.12)

Avoidance of attachment Supervisor to employee
attach_avoi_SV <- rnorm(n1, mean = 2.92, sd = 1.19)

DV:
exhaustion <- rnorm(n, 22.19, 9.53)

What do I have to do? Can you help me?

Thanks a lot, Tom.
Let's do this step by step. We'll start with something simple and build towards a full HLM. First, you have a few important-yet-ambiguous statements that need more precise definitions. What does "general characteristics of the attachment", "predicts the burnout risk" and "higher the attachment avoidance among managers, the higher the risk of burnout among subordinates" actually mean? You need to turn these generic statements into regression coefficients, error variances, covariate distributions, etc.

Second, would you know how to simulate this question as an OLS regression model? Forget the HLM part for now.
 
Last edited: