urgent
Posted: Sat Nov 17, 2018 10:27 pm
Hello, I have a problem with the output,i want to do on children nutritional status,i have three dependent continuous variables,haz,waz and whz,that i want to fit multivariate multilevel model using r2mlwin with r code. With level-1 variable correlation between the dependent,level 2 children,and level 3 as region,but it says ur covariance matrix is not positive definit.Many thanks.
My code is library(R2MLwiN)
# 1 Path to MLwiN executable
mlwin <- "C:\\Program Files (x86)\\MLwiN trial\\i386"
# 2 variables containing IDs
levID <- c("region", "childid")
# 3 Distribution to be modelled
D <- "Multivariate Normal"
# 4 Method of estimation (1 = MCMC)
estoptions <- list(EstM = 1)
# 5 The data file
indata <- cd
# 6 The model
f1 <- c(WHZ, HAZ, WAZ) ~ 1 + (1 | region) + (1 | childid)
mod1 <- runMLwiN(f1, data = cd, MLwiNPath = mlwin, D = D)
Am i right?
pls help me since its an urgent case i can send my data too!!!
And when i make region as level 1 variable it says its repeated generate unique id,but also i dont know how to generate the factor variable region!
My code is library(R2MLwiN)
# 1 Path to MLwiN executable
mlwin <- "C:\\Program Files (x86)\\MLwiN trial\\i386"
# 2 variables containing IDs
levID <- c("region", "childid")
# 3 Distribution to be modelled
D <- "Multivariate Normal"
# 4 Method of estimation (1 = MCMC)
estoptions <- list(EstM = 1)
# 5 The data file
indata <- cd
# 6 The model
f1 <- c(WHZ, HAZ, WAZ) ~ 1 + (1 | region) + (1 | childid)
mod1 <- runMLwiN(f1, data = cd, MLwiNPath = mlwin, D = D)
Am i right?
pls help me since its an urgent case i can send my data too!!!
And when i make region as level 1 variable it says its repeated generate unique id,but also i dont know how to generate the factor variable region!