Hi all:
I have a dataset which contains two variables: Y and time
y<-c(228,189,232,198,252,315)
time<-2003:2008

How can I find out the trend(increase/decrease) of y along the time period?

If I use:
lm(y~time)

The "lm" command treats time as natural number,but not date.
So maybe "lm" isn't appropriate.

Then,which function could be used?

Thanks a lot for your help.

My best

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to