[R] Multivariate OLS
r400 r400
r_253309 at yahoo.com
Mon Jan 8 13:10:26 CET 2007
Dear all R users,
Suppose I have a VECTOR of time series y[t] consists of 2000 data point. For example suppose I have data frame which has two columns. First column represents a time series of exchange rate for 2000 days. And the second column represents the price of a commodity for the same period. Now I want to fit a OLS regression like that,
y[t] = a + b*delta[y[t-1]] + c*delta[y[t-2]] + epsilon[t]
as y[t] is not a vector rather a data frame containing two columns I could not use lm() function. Can anyone give me any idea how to do that in R?
Thanks and regards,
jon
Send instant messages to your online friends http://uk.messenger.yahoo.com
More information about the R-help
mailing list