Full_Name: Hannu Kahra Version: 1.0.0 OS: Windows Submission from: (NULL) (153.1.50.127) x1 <- lag(x, k=1) returns the original series x. The time series is not shiftet at all. Only the time is shiftet: for x1 new start = old start -1 and new end = old end -1. When I run, e.g. lm(x~x1) the result is not what I expect. Both x and x1 are time series. Is this a bug or am I forgetting something? Regards Hannu Kahra -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 17 Mar 2000 kthaka@uta.fi wrote:> Full_Name: Hannu Kahra > Version: 1.0.0 > OS: Windows > Submission from: (NULL) (153.1.50.127) > > > x1 <- lag(x, k=1) returns the original series x. The time series is not > shiftet at all. Only the time is shiftet: for x1 new start = old start -1 > and new end = old end -1. When I run, e.g. lm(x~x1) the result is not whatSo that is _not_ the original series!> I expect. Both x and x1 are time series. Is this a bug or am I forgetting > something?Your description is exactly as documented: Lag a Time Series Description: Computed a lagged version of a time series, shifting the time base back by `k' observations. [Please read the documentation before submitting a bug report. The FAQ tells you what a bug is.] Don't apply regression (a non-time-series technique) to time series, and expect the implicit conversion to vectors to preserve the time alignment. Do something like library(ts) data(lh) df <- cbind(x=lh, x1 =lag(lh, 1)) lm(x ~ x1, data=df) -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
here is another thing on my relatively standard solaris 7 configuration i had to put LIB="-lnsl -lsocket" in config.site perhaps this can be done by configure automatically, if gcc is found? -- Erich Neuwirth, Computer Supported Didactics Working Group Visit our SunSITE at http://sunsite.univie.ac.at Phone: +43-1-4277-38624 Fax: +43-1-4277-9386 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 17 Mar 2000, Erich Neuwirth wrote:> here is another thing > > on my relatively standard solaris 7 configuration i had to put > LIB="-lnsl -lsocket" > in config.site > > perhaps this can be done by configure automatically, > if gcc is found?On my Solaris 7 configuration it is looked for automatically with either cc or gcc. The check is part of X_EXTRA_LIBS If we are going to configure --without-x it would need to be checked for. -thomas Thomas Lumley Assistant Professor, Biostatistics University of Washington, Seattle -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> Thomas Lumley writes:> On Fri, 17 Mar 2000, Erich Neuwirth wrote: >> here is another thing >> >> on my relatively standard solaris 7 configuration i had to put >> LIB="-lnsl -lsocket" >> in config.site >> >> perhaps this can be done by configure automatically, >> if gcc is found?> On my Solaris 7 configuration it is looked for automatically with > either cc or gcc. The check is part of X_EXTRA_LIBS> If we are going to configure --without-x it would need to be checked > for.I think we need to test for socket functionality, both for header files and libraries. Let me see if I can come up with such a test ... Where did sock.c && friends come from? -k -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._