Multiple membership model: Error in combchains[, FP.names, drop = FALSE] : subscript out of bounds
Posted: Thu Nov 03, 2016 11:33 am
Hey there,
I want to fit a multiple membership model using the R2MLwiN package and get the error in R:
Error in combchains[, FP.names, drop = FALSE] : subscript out of bounds
The model is estimated correctly in MLwiN as far as I can see (using debugmode = T).
Hence, I get the feeling it has to with the R2MLwiN package itself. I tried to debug it myself but can't find a solution.
The code I specified in R is:
data.wide <- readRDS("mm.rds")
runMLwiN(y ~ 1 + country.x + gov.het.sum + (1 | id.country) + (1 | p) + (1 | id.gov),
estoptions = list(EstM = 1, debugmode = T, mm = list(NA, list(mmvar = list("p", "p2", "p3", "p4"), weights = list("w1", "w2", "w3", "w4")), NA)),
data = data.wide)
Please find the data attached. I had to zip it before uploading it.
I am very grateful for any help!
Kind regards,
Benjamin
I want to fit a multiple membership model using the R2MLwiN package and get the error in R:
Error in combchains[, FP.names, drop = FALSE] : subscript out of bounds
The model is estimated correctly in MLwiN as far as I can see (using debugmode = T).
Hence, I get the feeling it has to with the R2MLwiN package itself. I tried to debug it myself but can't find a solution.
The code I specified in R is:
data.wide <- readRDS("mm.rds")
runMLwiN(y ~ 1 + country.x + gov.het.sum + (1 | id.country) + (1 | p) + (1 | id.gov),
estoptions = list(EstM = 1, debugmode = T, mm = list(NA, list(mmvar = list("p", "p2", "p3", "p4"), weights = list("w1", "w2", "w3", "w4")), NA)),
data = data.wide)
Please find the data attached. I had to zip it before uploading it.
I am very grateful for any help!
Kind regards,
Benjamin