Specifying starting values behaves strangely
Posted: Sat Oct 03, 2015 2:28 am
Hi
I am trying to specify starting values as this:
a)
test.mcmc2 <- runMLwiN(logit(AbsolutDep, cons) ~ 1 + DisVic + (1 | country) + (1 |CountryClusterHouse),
D = "Binomial", estoptions = list(EstM = 0,
debugmode=T,
startval=list(FP.b = FP.b.my)),
data = dfrm)
b)
This generates the following error:
> test.mcmc2 <- runMLwiN(logit(AbsolutDep, cons) ~ 1 + DisVic + (1 | country) + (1 |CountryClusterHouse),
+ D = "Binomial", estoptions = list(EstM = 0,
+ startval=list(FP.b = FP.b.my)),
+ data = dfrm)
/nogui option ignored
ECHO 0
Echoing is ON
BATC 1
Batch mode is ON
MAXI 2
STAR
iteration 0
iteration 1
Convergence not achieved
JOIN -1.71714532375336 2.10982799530029 '_FP_b'
JOIN 0 0 0 '_FP_v'
JOIN 0 0 0 '_RP_b'
JOIN 0 0 0 0 0 0 '_RP_v'
TOLE 2
MAXI 20
NEXT
error while obeying batch file C:/Users/adel/AppData/Local/Temp/Rtmp4GO7Gq/macrofile_1d0056b63ef7.txt at line number 81:
NEXT
random part gone to zero - can not continue
WARNING: macro file has aborted, your data may be in a transformed state
WARNING: macro file has aborted, your data may be in a transformed state
error while obeying batch file C:/Users/adel/AppData/Local/Temp/Rtmp4GO7Gq/macrofile_1d0056b63ef7.txt at line number 81:
NEXT
random part gone to zero - can not continue
.
Execution completed
Error in read.dta(IGLSfile) :
unable to open file: 'No such file or directory'
###
c)
However, if I run in debug mode and press Start and then Resume Macro. The code will work. This means that Mlwin takes the code from R2mlwin, after a number of iterations the estimate turn green, the object is exported back to R successfully.
d)
But, if I press Resume Macro first, it will fail. With the error code as captured by the screen shot.
Additional information: Running this tutorial involving starining values actually works:
file.show(system.file("demo", "MCMCGuide05.R", package = "R2MLwiN"))
I am not sure what is going on.
Thanks for your input
Adel
I am trying to specify starting values as this:
a)
test.mcmc2 <- runMLwiN(logit(AbsolutDep, cons) ~ 1 + DisVic + (1 | country) + (1 |CountryClusterHouse),
D = "Binomial", estoptions = list(EstM = 0,
debugmode=T,
startval=list(FP.b = FP.b.my)),
data = dfrm)
b)
This generates the following error:
> test.mcmc2 <- runMLwiN(logit(AbsolutDep, cons) ~ 1 + DisVic + (1 | country) + (1 |CountryClusterHouse),
+ D = "Binomial", estoptions = list(EstM = 0,
+ startval=list(FP.b = FP.b.my)),
+ data = dfrm)
/nogui option ignored
ECHO 0
Echoing is ON
BATC 1
Batch mode is ON
MAXI 2
STAR
iteration 0
iteration 1
Convergence not achieved
JOIN -1.71714532375336 2.10982799530029 '_FP_b'
JOIN 0 0 0 '_FP_v'
JOIN 0 0 0 '_RP_b'
JOIN 0 0 0 0 0 0 '_RP_v'
TOLE 2
MAXI 20
NEXT
error while obeying batch file C:/Users/adel/AppData/Local/Temp/Rtmp4GO7Gq/macrofile_1d0056b63ef7.txt at line number 81:
NEXT
random part gone to zero - can not continue
WARNING: macro file has aborted, your data may be in a transformed state
WARNING: macro file has aborted, your data may be in a transformed state
error while obeying batch file C:/Users/adel/AppData/Local/Temp/Rtmp4GO7Gq/macrofile_1d0056b63ef7.txt at line number 81:
NEXT
random part gone to zero - can not continue
.
Execution completed
Error in read.dta(IGLSfile) :
unable to open file: 'No such file or directory'
###
c)
However, if I run in debug mode and press Start and then Resume Macro. The code will work. This means that Mlwin takes the code from R2mlwin, after a number of iterations the estimate turn green, the object is exported back to R successfully.
d)
But, if I press Resume Macro first, it will fail. With the error code as captured by the screen shot.
Additional information: Running this tutorial involving starining values actually works:
file.show(system.file("demo", "MCMCGuide05.R", package = "R2MLwiN"))
I am not sure what is going on.
Thanks for your input
Adel