Whoops, fixed a typo:
library("zoo")
data = c(50, 32, 22, 13, 14, 6, 12, 3, 6, 21, NA, NA, 15, 13, 17, 9, 11, 34,
63)
dataz = zoo(data, 1:length(data))
datat = as.ts(dataz)
datatt = ts(datat, frequency=2)
frequency(datatt)
length(datatt)
# these all give errors
stl(datatt, s.window="per")
# this n
Gabor,
On Wed, Jan 19, 2011 at 3:36 PM, Gabor Grothendieck wrote:
> stl does not support series with NAs
>
Thank you. This is what I needed to know.
Cheers,
--
- Adam J. Oliner
[[alternative HTML version deleted]]
__
R-help@r-project.org
On Wed, Jan 19, 2011 at 5:21 PM, Adam Oliner wrote:
> The objective is to get the stl calls to work without making up values for
> the NAs:
>
> library("zoo")
> data = c(50, 32, 22, 13, 14, 6, 12, 3, 6, 21, NA, NA, 15, 13, 17, 9, 11, 34,
> 63)
> dataz = zoo(data, 1:length(data))
> t = as.ts(dataz)
The objective is to get the stl calls to work without making up values for
the NAs:
library("zoo")
data = c(50, 32, 22, 13, 14, 6, 12, 3, 6, 21, NA, NA, 15, 13, 17, 9, 11, 34,
63)
dataz = zoo(data, 1:length(data))
t = as.ts(dataz)
datat = as.ts(dataz)
datatt = ts(t, frequency=2)
frequency(datatt)
My series was regularly spaced, it simply contained missing values. I don't
see why the new values were added.
Besides, my previous email showed exactly how to convert a zoo object with
missing values into a ts object with missing values and a frequency other
than 1, so I'm not sure what you mean:
On Wed, Jan 19, 2011 at 4:27 PM, Adam Oliner wrote:
> My series was regularly spaced, it simply contained missing values. I don't
> see why the new values were added.
>
> Besides, my previous email showed exactly how to convert a zoo object with
Please provide a minimal self-contained reproducibl
On Wed, Jan 19, 2011 at 4:17 PM, Adam Oliner wrote:
> Gabor,
>
> If you follow those steps on a series with missing values, the resulting tt
> will contain tons of new NAs. (See my original email and the call to "zrt =
zoo and zooreg classes handle series which may not be regularly spaced
whereas
Gabor,
If you follow those steps on a series with missing values, the resulting tt
will contain tons of new NAs. (See my original email and the call to "zrt =
as.ts(zr)".)
At any rate, I finally managed to finagle a ts with the correct frequency by
coercing to ts _twice_ and specifying the freque
This still does not give me the desired behavior:
> z = zoo(x, order.by=t, frequency=24)
> t = as.ts(z)
... inserts 23 NA values between every actual value. This is not correct;
the original data has a frequency of 24 and doesn't need one forced upon it
during coercion.
> z = zoo(x, order.by=t)
>
On Wed, Jan 19, 2011 at 3:07 PM, Adam Oliner wrote:
> This still does not give me the desired behavior:
>
>> z = zoo(x, order.by=t, frequency=24)
>> t = as.ts(z)
> ... inserts 23 NA values between every actual value. This is not correct;
> the original data has a frequency of 24 and doesn't need o
On Wed, Jan 19, 2011 at 1:10 PM, Adam Oliner wrote:
> I don't seem to have that method:
>
>> zts = as.ts.zoo(z)
> Error: could not find function "as.ts.zoo"
>
> I'm finding forum posts from people trying to use stl directly with zoo[reg]
> functions (despite the documentation specifying ts) but di
I don't seem to have that method:
> zts = as.ts.zoo(z)
Error: could not find function "as.ts.zoo"
I'm finding forum posts from people trying to use stl directly with zoo[reg]
functions (despite the documentation specifying ts) but discovering that stl
gives errors with NA entries. I encountered s
On Tue, Jan 18, 2011 at 6:33 PM, Adam Oliner wrote:
> Hi,
>
> I'm trying to make a ts object that has both NA values and a frequency other
> than 1 (so I can use stl). I've tried all permutations I can think of, but
> cannot get the desired (expected?) results.
>
> The values live in x and the cor
Hi,
I'm trying to make a ts object that has both NA values and a frequency other
than 1 (so I can use stl). I've tried all permutations I can think of, but
cannot get the desired (expected?) results.
The values live in x and the corresponding semi-regular time stamps are in
t:
> library('zoo')
>
14 matches
Mail list logo