[ADMB Users] R glmm.admb error trapping
Jager, Yetta
jagerhi at ornl.gov
Thu Jan 13 07:42:05 PST 2011
Hi all,
Thanks for your suggestions in response to an earlier thread. I wanted to provide a solution that ended up working (below). The developers
were also very helpful with suggestions. Thanks for your help.
Yetta
# Run admb in try block
fail <- tryCatch(
{
print("inside tryCatch")
# options(show.error.messages = TRUE);
# M[[my_id]] <- lm( new_fixed, data = Data);
M[[my_id]] <- glmm.admb( fixed = new_fixed, random = ~1, group = "Subregion", data = Data,
family = "nbinom", verbose = TRUE, out.dir = "C:\\Biomass_Biodiversity\\R\\ADMB-outdir")
print(M[[my_id]]);
0
}, error=function(err)
{
print("caught an error");
traceback();
warnings();
print(paste("Model failed for variables ", new_fixed, sep=""));
1
})
fail;
More information about the Users
mailing list