I read that the default setting of lme4 is listwise deletion. My data is in long format (repeated measures with two time points) and it doesn’t appear that it really deletes listwise (as I understand it, this would mean that subjects with missing values on the dependent variable at either T0 or T3 are not taken into account in the analysis). I get this impression when I look at the ‘number of observations’ on the output. This number corresponds exactly to the number of my data points, but only if I take into account the observations of the subjects who only have data for either T0 or T3. Any help?
Here is the function:
model <- lmer(Dependent_variable ~ Group*Timepoint + Age + Centre + (1|Subject), Data_longformat)
The result when printing the model:
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: BE_S ~ Gruppe * Zeitpunkt + Alter + Zentrum + (1 | Patient)
Data: BES_alle_long_change
REML criterion at convergence: 622.7
Scaled residuals:
Min 1Q Median 3Q Max
-1.82915 -0.57270 0.05619 0.59276 2.02843
Random effects:
Groups Name Variance Std.Dev.
Patient (Intercept) 0.4582 0.6769
Residual 0.6039 0.7771
Number of obs: 216, groups: Patient, 131
Counting the Subjects/Patients with Data for T0:
> result <- BES_alle_long_change %>%
+ filter(Zeitpunkt == "T0" & !is.na(BE_S)) %>%
+ summarize(count = n_distinct(Patient))
> print(result)
# A tibble: 1 × 1
count
<int>
1 119
Counting the Subjects/Patients with Data for T3:
result <- BES_alle_long_change %>%
+ filter(Zeitpunkt == "T3" & !is.na(BE_S)) %>%
+ summarize(count = n_distinct(Patient))
>
> print(result)
# A tibble: 1 × 1
count
<int>
1 97
FabRic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.