Dear R People: In library(ts), there is a function arima0 to estimate the ARMA parameters. R 1.2.3, windows Sometimes when fitting a model, an error occurs in the optim procedure. This error stops the process (which is as it should be). When running a simulation with many iterations, this error will stop the entire simulation. My question is, please: What is the best way to get out of the arima0 function when an error occurs without stopping the whole procedure? Thanks in advance! Sincerely, Erin M. Hodgess, Ph.D. Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown One Main Street Houston, TX 77002 e-mail: hodgess at uhddx01.dt.uh.edu -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 31 Jul 2001, Erin Hodgess wrote:> Dear R People: > > In library(ts), there is a function arima0 > to estimate the ARMA parameters. R 1.2.3, windows > > Sometimes when fitting a model, an error > occurs in the optim procedure. This error > stops the process (which is as it should be). > > When running a simulation with many iterations, > this error will stop the entire simulation. > > My question is, please: > What is the best way to get out of the arima0 > function when an error occurs without stopping > the whole procedure?Looks like a case for calling arima0 inside try(). The try help page has an example. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 31 Jul 2001, Erin Hodgess wrote:> Dear R People: > > In library(ts), there is a function arima0 > to estimate the ARMA parameters. R 1.2.3, windows > > Sometimes when fitting a model, an error > occurs in the optim procedure. This error > stops the process (which is as it should be). > > When running a simulation with many iterations, > this error will stop the entire simulation. > > My question is, please: > What is the best way to get out of the arima0 > function when an error occurs without stopping > the whole procedure?One way around this problem is to wrap the calculation in the try() function. -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._