Re: [R] dynlm

2011-06-21 Thread apjaworski
: t.dd <- ts(t.d, freq=24) t.mm <- ts(t.m, freq=24) Hope this helps, Andy From: Dave Evens To: "\"r-help@r-project.org\"" Date: 06/21/2011 04:13 PM Subject: [R] dynlm Sent by: r-help-boun...@r-project.org Dear All, I'm trying to use dynlm

[R] dynlm

2011-06-21 Thread Dave Evens
Dear All, I'm trying to use dynlm to fit a time series. I have 3 seasonal terms. Here is an example of the problem. This is my time variable, hourly data: timeSeries <- seq(as.POSIXct("2011-01-01 00:00:00"), as.POSIXct("2011-12-31 23:00:00"), by="hour") My response is: y <- rnorm(length(

[R] dynlm question

2011-06-20 Thread Dave Evens
Dear All, I'm trying to use dynlm to fit a time series. I have 3 seasonal terms. Here is an example of the problem. This is my time variable, hourly data: timeSeries <- seq(as.POSIXct("2011-01-01 00:00:00"), as.POSIXct("2011-12-31 23:00:00"), by="hour") My response is: y <- rnorm(length(

Re: [R] dynlm predict with newdata?

2009-11-23 Thread Gabor Grothendieck
The dyn package has a predict method that can typically be used to predict one step ahead (and you can use a loop to get multiple steps). To use just preface lm (or glm or any model fitting function in R that uses model.frame in the same way as lm). It works with zoo, zooreg, ts, its and irts cla

Re: [R] dynlm predict with newdata?

2009-11-23 Thread Achim Zeileis
On Sun, 22 Nov 2009, zubin wrote: Hello, can one use predict, as you can with other model objects like lm, with dynlm to predict a new data set that is identical in field names, just a different time period. Be nice if you could, I don't really want to create a new data set with all the lags, h

[R] dynlm predict with newdata?

2009-11-22 Thread zubin
Hello, can one use predict, as you can with other model objects like lm, with dynlm to predict a new data set that is identical in field names, just a different time period. Be nice if you could, I don't really want to create a new data set with all the lags, hoping it would generate dynamically.

Re: [R] dynlm question: How to predefine formula for call to dynlm(formula) call

2009-04-19 Thread Achim Zeileis
On Sat, 18 Apr 2009, Ron Burns wrote: I want to set up a model with a formula and then run dynlm(formula) because I ultimately want to loop over a set of formulas (see end of post) R> form <- gas~price R> dynlm(form) Time series regression with "ts" data: Start = 19

[R] dynlm question: How to predefine formula for call to dynlm(formula) call

2009-04-18 Thread Ron Burns
I want to set up a model with a formula and then run dynlm(formula) because I ultimately want to loop over a set of formulas (see end of post) R> form <- gas~price R> dynlm(form) Time series regression with "ts" data: Start = 1959(1), End = 1990(4) Works OK without a Lag

Re: [R] dynlm and lm: should they give same estimates?

2008-10-16 Thread Pfaff, Bernhard Dr.
Hello Werner, this is easily clarified. The code in my book contains an error: please replace the line: error.lagged <- error[-c(99, 100)] with error.lagged <- error[-c(1, 100)] I will file this in the errata section on my web-site and will correct the relevant example in the urca and vars pack

Re: [R] dynlm and lm: should they give same estimates?

2008-10-15 Thread Achim Zeileis
On Wed, 15 Oct 2008, Werner Wernersen wrote: Hi, I was wondering why the results from lm and dynlm are not the same for what I think is the same model. ...because it's not the same model :-) I haven't looked at this in detail, but: set.seed(123456) e1 <- rnorm(100) e2 <- rnorm(100) y1 <-

[R] dynlm and lm: should they give same estimates?

2008-10-15 Thread Werner Wernersen
Hi, I was wondering why the results from lm and dynlm are not the same for what I think is the same model. I have just modified example 4.2 from the Pfaff book, please see below for the code and results. Can anyone tell my what I am doing wrongly? Many thanks, Werner set.seed(123456) e1 <-