I am trying to use the psfmi package to pool logistic regression models over 10 datasets. Here is my code:
pool_lr <- psfmi_lr(data=datcomp, nimp=10, impvar=".imp", formula = Case ~ Age + eye_grp + factor(SkClr), factor(Hair_new), factor(Educ), method="D3")
I am getting the following warnings:
Error in FUN(X[[i]], ...) :
Categorical variable(s) only 2 levels,
do not define as categorical
In addition: Warning message:
There were 39 warnings in `mutate()`.
The first warning was:
ℹ In argument: `eye_grp = (structure(function (..., .x = ..1, .y = ..2, . = ..1) ...`.
Caused by warning in `as.numeric()`:
! NAs introduced by coercion
ℹ Run dplyr::last_dplyr_warnings() to see the 38 remaining warnings.
A note about the first warning about the categorical variable – all the variables I’ve labeled as categorical have at least 3 levels. I am confused by both warnings and would greatly appreciate help on how to solve the problems.