Sarah wrote:> I am trying to fit a linear model with seasonal effects but keep getting
> 'Incorrect number of dimensions'. I have no idea what this means
or how to
> fix it. I am following instructions received from an instructor and it
> worked for him, so I assume it has something to do with my data. Here is
my
> code:
>
> sed<-ts(data2[,-c(1,2)],start=c(1967,10),end=c(2007,9),freq=12)
> ym<-time(sed)
> month<-as.factor(sed[,"Period"])
> Error in `[.default`(sed, , "Period") : incorrect number of
dimensions
>
> So I am getting the error when I try to designate month as a factor.
>
> Help!
If you guess is it has something to do with your data, it might make
sense to show them so that we can tell you if that is true or not...
By the way, the posting guide asks you to send reproducible code anyway.
Uwe Ligges