In my experiment, each patient has been observed twice, once using placebo and the other time using the real treatment. I want to assess the predictive effects of the treatment and patients' demographics (age, sex, etc.). Therefore I have for example 100 patients, but actually 200 pairs of treatment (0 and 1 for placebo and the real treatment, respectively) and disease (0 and 1 for the absence or presence of the disease).
This way, I have duplicated (copied & pasted) my 100 rows of patients' demographics into 200 rows and have distinguished these two 100-row bundles of data by the variable "treatment" (100 rows with treatment = 0, 100 copied rows with treatment = 1).
Now I need to run a mixed model regression to account for the multilevel design and avoid atomistic fallacy (thanks to Greta).
I have written the following R syntax, but there are some problems: first that the P values are really disappointing (all above 0.8, although they might be correct). Second that I don't know if the code is correct in the first place or not!!
My code is:
After converging, R warns
I would be so grateful if you (looking at you Jake!) could check if my syntax is correct. I want R to treat the four demographics as repeated-measures or nested within the duplicated patients. Each patient has a unique PatientID [100 PatientIDs repeated in 200 cases].
Many thanks.
This way, I have duplicated (copied & pasted) my 100 rows of patients' demographics into 200 rows and have distinguished these two 100-row bundles of data by the variable "treatment" (100 rows with treatment = 0, 100 copied rows with treatment = 1).
Now I need to run a mixed model regression to account for the multilevel design and avoid atomistic fallacy (thanks to Greta).
I have written the following R syntax, but there are some problems: first that the P values are really disappointing (all above 0.8, although they might be correct). Second that I don't know if the code is correct in the first place or not!!
My code is:
Code:
(mixed <- lmer(Disease ~ Gender + Age + Demographic3 + Demographic4 + TREATMENT
+ Age*Demographic4 + Age*TREATMENT + Age*Gender + Age*Demographic3 + Demographic4*TREATMENT + Demographic4*Gender
+ Demographic4*Demographic3 + TREATMENT*Gender + TREATMENT*Demographic3 + Gender*Demographic3
+ (Age | PatientID)
+ (Gender | PatientID)
+ (Demographic3 | PatientID)
+ (Demographic4 | PatientID)
, family=binomial(logit), MixedModelData))
Code:
In mer_finalize(ans) : false convergence (8).
Many thanks.