Error while obeying batch file... wrong number of output columns (full screen shot of error message attached).
Here's my code which sets up the data, specifies a variety of models (1-4), before focusing on how it's done in MCMC Guide 06. It's a three level model, with annual repeated broadband speed measurements (yrid), nested within local authorities (laid), nested within regions (rnid).
Data is attached = total.xlsx (sorry, it wouldn't let me upload the .csv!)
Any help would be much appreciated.
Code: Select all
mlwin = c("C:/Program Files (x86)/MLwiN v2.35/i386")
options(MLwiN_path = mlwin)
total<-read.csv("total.csv")
is.num <- sapply(total, is.numeric)
total[is.num] <- lapply(total[is.num], round, 2)
total$year <- total$year.num
## IGLS
(mymodel1 <- runMLwiN(speed ~ 1 + sfbb + (1| rnid) + (1 | laid) + (1 | yrid), data = total))
## Gibbs (with diffuse priors/gamma priors, as standard) (MCMC)
(mymodel2 <- runMLwiN(speed ~ 1 + sfbb + (1| rnid) + (1 | laid) + (1 | yrid), estoptions = list(EstM = 1), data = total))
## Diffuse priors (Uniform priors) (MCMC)
(mymodel3 <- runMLwiN(speed ~ 1 + sfbb + (1| rnid) + (1 | laid) + (1 | yrid), estoptions = list(EstM = 1, mcmcMeth = list(priorcode = 0)), data = total))
## slope at level 1 using sfbb (MCMC)
(mymodel4 <- runMLwiN(speed ~ 1 + sfbb + (1| rnid) +(1 | laid) + (1 + sfbb| yrid), estoptions = list(EstM = 1), data = total))
-------------------
#Follow guide 06
## Choose MCMC algoritm for estimation (IGLS will be used to obtain starting values for MCMC)
(mymodel6 <- runMLwiN(speed ~ 1 + sfbb + rnid + laid + rnid:sfbb + (1 | yrid), estoptions = list(EstM = 1), data = total))
## Define the model Choose IGLS algoritm for estimation Fit the model
(mymodel6.1 <- runMLwiN(speed ~ 1 + sfbb + (1 | rnid) + (1 | laid) + (1 + sfbb| yrid), data = total))
## Choose MCMC algoritm for estimation (IGLS will be used to obtain starting values for MCMC)
(mymodel6.20 <- runMLwiN(speed ~ 1 + sfbb + (1 | rnid) + (1 | laid) + (1 + sfbb| yrid), estoptions = list(EstM = 1, mcmcMeth = list(iterations = 5001), resi.store.levs= 2),data = total))