Hello everyone,
I want to estimate a multilevel mixed type model: y1 is Normal and y2 is Poisson.
I’m using the following code:
model= c(y1, log(y2)) ~ 1 + x1 + (1 | group) + (1[1] | idn )
mymodel3 <- runMLwiN( model, D = c("Mixed", "Normal", "Poisson"),
estoptions = list(EstM = 0, resi.store=TRUE),
data = sample).
I obtain the following error:
"error while obeying batch file wrong number of output columns
.
Execution completed
Error in foreign::read.dta(resifile) :
unable to open file: 'No such file or directory' "
Do you know what's going on?
Thanks.
Angelo
Multivariate Models: mixture y1: Normal and y2: Poisson
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Multivariate Models: mixture y1: Normal and y2: Poisson
This appears to be a bug in R2MLwiN. If you remove or comment out lines 1469-1475 in https://github.com/rforge/r2mlwin/blob/ ... ite.IGLS.R, i.e.:
then it appears to work correctly.
I have attached a source version of the R2MLwiN package where I have made this change.
Code: Select all
if (level == 2 & D[[1]][1] == "Mixed") {
for (i in 2:length(D)) {
if (D[[i]][1] == "Binomial" | D[[i]][1] == "Poisson") {
len.rpx <- len.rpx + 1
}
}
}
I have attached a source version of the R2MLwiN package where I have made this change.
- Attachments
-
- R2MLwiN_0.8-7.tar.gz
- (340.41 KiB) Downloaded 817 times