search for: allengland

Displaying 1 result from an estimated 1 matches for "allengland".

2008 Aug 18
2
Using lag
...c), and the response variable (admissions). The dataset is fairly large (1530 observations). I simply want to model the response against a lag of a couple of the explanatory variables, say maxitemp and rainfall. I would like to look at lagtimes of 4 days, i.e. 4 observations. My dataframe is called allengland. I thought I would be able to do something like: model1 <- lm(admissions~lag(maxitemp,4),data=allengland) but when I compare this to a lag of 0 I have exactly the same output, so I am clearly doing something wrong. Could someone please point me in the right direction? The example in the...