I am about to start my first DeclareDesign, which is also my first R-project. Unfortunately, I already have problems in the first lines of code. Help is much appreciated.
I will run a simple survey-experimental design with two arms and 2+3 experimental groups. To increase efficiency, I want to make use of pre-treatment covariates, using the lm_lin-model.
In the first step, therefore, I wanted to fabricate the pre-treatment covariates.
I would have thought that, in a second step, I would simulate the dependent variable, specifying the assumed correlation between DV and pre-treatment covariates so that the DeclareDesign power analysis (which I would specify later) could then take this information into account.
(I was somewhat confused that a recent blog-post on power strategies that discussed pre-treatment covariate adjustment fabricatr was not mentioned at all. Is my approach entirely wrong?)
Pre-treatment variable 1 is the mean value of three 5-point likert-scale indicators, which I assumed to be correlated at rho = .8
The DV is also the mean value of three 5-point likert-scale indicators, which I assumed to be correlated at rho = .8
I assume a correlation between pre-treatment variable 1 and DV of rho = .7
fabricated_data <- fabricate(
N = 100,
pretreatmentvar1_ind1 = draw_likert(x = rnorm(n = N),
type = 5),
pretreatmentvar1_ind2 = correlate(given = pretreatmentvar1_ind1 , rho = 0.8, draw_likert)
)
I noticed in that correlated does not support draw_likert, which confused me as multiple indicators with likert scales are very frequent. Do I have to prent that these are count variables in order to make this work? However, in a response by @nfultz in a related thread I saw that he does suggest simulating correlated Likert variables.
Thank you for any help with these first baby steps and thank you for setting all this up in the first place!