Re: [R] stopping stepAIC (MASS package)

2009-02-17 Thread Ben Bolker
Peter Jepsen  DCE.AU.DK> writes:
> [snip]
>  ... I would save valuable time if
> the procedure would stop automatically when it encounters any anomaly
> that causes it to warn me. Is this possible? And if so, how?
> 

  Maybe options(warn=2)  will do what you want.

  Ben Bolker

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] stopping stepAIC (MASS package)

2009-02-17 Thread Peter Jepsen
Dear R-listers,

I am building a prediction model starting with many, many variables. I
use the 'stepAIC' procedure in the MASS package, and the model building
process takes several hours to complete. At the very end, I am
occasionally confronted with warnings like this one:

Warning messages:
1: In fitter(X, Y, strata = Strata, offset = offset, weights = weights,
:
  Loglik converged before variable  4 ; beta may be infinite. 

In these instances, I take it that I have stretched my data too thin,
and I discard the final model. Therefore, I would save valuable time if
the procedure would stop automatically when it encounters any anomaly
that causes it to warn me. Is this possible? And if so, how?

Thank you in advance for any assistance.

Peter Jepsen, MD


> sessionInfo()
R version 2.8.1 (2008-12-22) 
i386-pc-mingw32 

locale:
LC_COLLATE=Danish_Denmark.1252;LC_CTYPE=Danish_Denmark.1252;LC_MONETARY=
Danish_Denmark.1252;LC_NUMERIC=C;LC_TIME=Danish_Denmark.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base


other attached packages:
[1] MASS_7.2-45
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.