Dear R-users,

I am doing simulations with lmer function. For every simulation I extract
estimates,...into a database, but I also want to have a variable that would
indicate whether simulated data converged properly or not. (I get warnings,
for ex. singular convergence, false convergence,...but the estimates are
given anyway).

I tried to cope with the problem so that I change warnings to error (warn=2)
and use function try, like below:

ok <- function(x,type= "try-error ") class(x)!=type

options(warn=2)

fitmodel <- try(lmer(modelformula,data))

but

ok(fitmodel)

gives me TRUE even if I get a warning!


Thank you!


Ursa Reja




######~~~~~~~~~~   extract deviances  ~~~~~~~~~~######



##if(ok(fitmodel)&ok(fitmodel1)&ok(fitmodel2)&ok(fitmodel3))

##if(ok(fitmodel))

##{

	[[alternative HTML version deleted]]


