Quantcast

Extract data from tseries stl function

classic Classic list List threaded Threaded
2 messages Options
nmo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Extract data from tseries stl function

nmo
I have generated a table using the stl function from tseries.

How can I extract (other than manual copy) data from a column (eg trend)

any help very much appreciated
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extract data from tseries stl function

David Winsemius

On Oct 14, 2009, at 5:05 PM, nmo wrote:

>
> I have generated a table using the stl function from tseries.

How?

>
> How can I extract (other than manual copy)

Huh?

> data from a column (eg trend)

First you look at the structure of the object. In my case, since you  
did not provide a worked example (ggrrrr), I used the first help page  
example:

library(tseries)
stllc <- stl(log(co2), s.window=21)
str(stllc)

Then you can see where the data resides:

stllc$time.series[ ,"trend"]

> --


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
[hidden email] 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.
Loading...