Dear all,
 
I would like to fit an ARMA model, but I'm not sure exactly how to fit it.
 
Here's an example of the problem.
 
This is my time variable, hourly data 
t <- seq(as.POSIXct("2011-01-01 00:00:00"), as.POSIXct("2011-12-31 23:00:00"), by="hour")
 
my response
y <- rnorm(length(t), 1000, 500)
 
seasonal factors:
t.h <- as.POSIXlt(t)$hour # hours of the day
t.d <- as.POSIXlt(t)$day  # days of the week
t.m <- as.POSIXlt(t)$mon  # months of the year
 
 
this is my regressor
x.reg <- rnorm(length(t), 10, 1)
 
 
and I have the following auto-regressive lags (1 to 10, 24, and 48 hours)
y.lag1 <- lag(y, 1)
y.lag2 <- lag(y, 2)
y.lag3 <- lag(y, 3)
y.lag4 <- lag(y, 4)
y.lag5 <- lag(y, 5)
y.lag6 <- lag(y, 6)
y.lag7 <- lag(y, 7)
y.lag8 <- lag(y, 8)
y.lag9 <- lag(y, 9)
y.lag10 <- lag(y, 10)
y.lag24 <- lag(y, 24)
y.lag48 <- lag(y, 48)

I want to fit an ARMA with my 3 seasonal factors, 12 lagged variables and the regressor against my response variable.
Does someone know how such an ARMA model can be fit?
 
Thank you for your help.
Regards,
Dave
	[[alternative HTML version deleted]]

