Re: [R] stl,package=stats

From: Pedro Rodrigues <prodrigues_at_dcc.fc.up.pt>
Date: Mon 19 Jul 2004 - 04:07:41 EST

On Sun, 2004-07-18 at 18:38, bob mccall wrote:
> Greetings:
>
> I'm using the time series decomposition routine "stl" from the package "stats".
> But how do I get the results into a vector to work with them?
> example:
>
> data(AirPassengers)
> m<-stl(AirPassengers,"per")
> print(m)
>
> This lists the output but can't figure out how to extract the individual series like seasonal, trend, irregular.

# Seasonal
as.vector(m$time.series[,1])
# Trend
as.vector(m$time.series[,2])
# Remainder
as.vector(m$time.series[,3])

>
> Thanks,
> Bob
>
>
> ---------------------------------
>
> Vote for the stars of Yahoo!'s next ad campaign!
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jul 19 04:16:09 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 02:36:42 EST