Error in foreign:read.dta(chainfile[i])
Posted: Mon May 15, 2023 3:43 pm
Having difficulty when estimating a two-level binomial logit with MCMC on a dataframe of 15k rows. I previously had no problem with this model but I'm coming back to it on a new system.
Model is:
Error message is:
It is able to complete estimation when very few predictors are specified (<5) but I receive this error as soon as I build it up. I've tried different dependent and independent variables, it doesn't seem to matter which are included. I've tried running it in debugmode and I can see the coefficients updating, it seems to finish with realistic estimates, and I am able to 'store' those estimates in the gui. If I press 'resume macro', I then receive the same error message of batch file & column lengths etc, in the MLwiN gui.
Any ideas?
Model is:
Code: Select all
model <- runMLwiN(logit(outcome) ~ 1 + var1 + var2 + var3 + var4 + var5 + var6 + var7 + (1 | L2id),
D = "Binomial", data = df,
estoptions = list(EstM = 1, mcmcMeth = list(burnin = 500, iterations = 5000)))
It then stops the execution and the model does not save.ECHO 0
error while obeying batch file C:/Users/William/AppData/Local/Temp/RtmpK0qjJ5/macrofile_8044d0d5325.txt at line number 465:
UNVE b1000 'parnum' 'itnum' 'mcmcchains' 'iteration' C2500 C2499 C2498 C2497 C2496 C2495 C2494 C2493 C2492 C2491 C2490 C2489 C2488 C2487 C2486 C2485 C2484 C2483 C2482 C2481 C2480 C2479 C2478 C2477 C2476 C2475 C2474 C2473 C2472 C2471 C2470 C2469 C2468 C2467
Column lengths do not match
error while obeying batch file C:/Users/William/AppData/Local/Temp/RtmpK0qjJ5/macrofile_8044d0d5325.txt at line number 465:
UNVE b1000 'parnum' 'itnum' 'mcmcchains' 'iteration' C2500 C2499 C2498 C2497 C2496 C2495 C2494 C2493 C2492 C2491 C2490 C2489 C2488 C2487 C2486 C2485 C2484 C2483 C2482 C2481 C2480 C2479 C2478 C2477 C2476 C2475 C2474 C2473 C2472 C2471 C2470 C2469 C2468 C2467
Column lengths do not match.
Execution completed
Error in foreign::read.dta(chainfile [ i ]) :
unable to open file: 'No such file or directory'
It is able to complete estimation when very few predictors are specified (<5) but I receive this error as soon as I build it up. I've tried different dependent and independent variables, it doesn't seem to matter which are included. I've tried running it in debugmode and I can see the coefficients updating, it seems to finish with realistic estimates, and I am able to 'store' those estimates in the gui. If I press 'resume macro', I then receive the same error message of batch file & column lengths etc, in the MLwiN gui.
Any ideas?