[R] Ignoring Errors in Simulations
Thomas W Blackwell
tblackw at umich.edu
Wed Nov 5 14:38:22 CET 2003
Either test each simulated data set explicitly for the
condition which causes factanal() to fail (perhaps rank
deficiency ?), or else use try(). Which is quicker,
using try() or restarting your simulation from the
beginning each time there's a failure ?
- tom blackwell - u michigan medical school - ann arbor -
On Wed, 5 Nov 2003, Ken Kelley wrote:
> Hello all.
> I'm doing a simulation study and every so often I get an error that stops
> the simulation. I would like to ignore the errors *and* identify the
> particular iterations where they occurred. I have tried:
> options(error = expression(NULL))
> which I thought would ignore the error, but the simulation is still stopped
> when an error occurs. I do not think try() is a good idea because of the
> significant computational time (that I think) it would add.
> Specifically I am using factanal() from the mva library and the error is:
> Error in factanal(Data, factors = 1, rotation = "none") :
> Unable to optimize from these starting value(s)
> -I am using R 1.7.1 on a Windows XP machine.
> Although increasing the number of starting values attempted would reduces
> the number or errors, I'm looking for a way that they are ignored and these
> (likely) untrustworthy results identified.
> Thanks for any thoughts,
> R-help at stat.math.ethz.ch mailing list
More information about the R-help