Hi,
I'm trying to perform multilevel multiple imputation using miceadds.
My dataset includes survival time and hence I calculated the Nelson-Aalen estimator using nelsonaalen (df, time, event). When I included the output in the model, I get Error in str2lang(x) : :1:15: unexpected ')' .
I was able to reproduce the error (see the code below) by using a few estimates that were obtained using nelsonaalen().
k<-data.frame(studyname=rep(c(1,2),50), t=
rep(c(0.02298016, 0.02499735, 0.02280831,
0.02160165),25
))
k$t[3]<-NA
predMatrix <- make.predictorMatrix(data = k)
predMatrix[,"studyname"]<--2
impMethod<-rep("2l.pmm",ncol(predMatrix))
names(impMethod)<-names(k)
mice(k, m = 1, predictorMatrix = predMatrix,maxit = 20,meth=impMethod,printFlag = T)
Would really appreciate your help.
Verion info below.
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Platform: x86_64-w64-mingw32/x64 (64-bit)
mice 3.14.0
miceadds 3.11-6