Skip to content

How to output "Trace" list from auto.arima in forecast library

3 messages · Jeff Ryan, Joshua Ulrich, Arun Krishnamoorthy

#
Take a look at ?sink

The trace is just a series of calls to 'cat', so it won't be
particularly useful unless you parse.

Jeff

On Mon, Oct 3, 2011 at 2:18 AM, Arun Krishnamoorthy
<arun.k at bridgei2i.com> wrote:

  
    
#
In addition to sink(), you can also use capture.output().  Then you
can read the contents of "out" into a new object.

out <- capture.output({
  Fit <- auto.arima(data_ts, trace=TRUE)
})
outData <- read.table(con <- textConnection(out), sep=":")
close(con)

Best,
--
Joshua Ulrich ?| ?FOSS Trading: www.fosstrading.com
On Mon, Oct 3, 2011 at 7:36 AM, Jeffrey Ryan <jeffrey.ryan at lemnica.com> wrote:
#
Works like magic!! Thanks Jeff and Joshua. 

There is a clear advantage in running lower order ARIMA models with drift in
comparison to what auto.arima gives. The AIC values just differ by a few
points so there isn't really much to choose based just on AIC. The competing
model however offers significant reduction in prediction error. 

Thanks for the help again.



-----Original Message-----
From: Joshua Ulrich [mailto:josh.m.ulrich at gmail.com] 
Sent: 03 October 2011 19:58
To: Jeffrey Ryan
Cc: Arun Krishnamoorthy; r-sig-finance at r-project.org
Subject: Re: [R-SIG-Finance] How to output "Trace" list from auto.arima in
forecast library

In addition to sink(), you can also use capture.output().  Then you
can read the contents of "out" into a new object.

out <- capture.output({
  Fit <- auto.arima(data_ts, trace=TRUE)
})
outData <- read.table(con <- textConnection(out), sep=":")
close(con)

Best,
--
Joshua Ulrich ?| ?FOSS Trading: www.fosstrading.com



On Mon, Oct 3, 2011 at 7:36 AM, Jeffrey Ryan <jeffrey.ryan at lemnica.com>
wrote:
data
frame.
this
data
not
?[,1]
some
using
elegant
http://r.789695.n4.nabble.com/Filtering-dates-times-from-zoo-xts-series-tp38
should go.
should go.