[R] Time series Regression with lags

2014-10-07 Thread jpm miao
Hi,

   I am working on zoo (time series) objects.

   Is there any way to do a time series regression with a lag period?

E.g., Y(t) = b1*X1(t)+b2*X(t-1)+b3*X2(t)

   Is "dynlm" the default one to use? Anything else

Thanks!

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R - Time Series Regression with a p-value check for each additional added point.

2011-05-24 Thread Rick Dunkelberger
Hi All,

Here is my sample data set..
y x
7/4/2009 -0.2368 -1.2727
7/11/2009 -0.5039 -5.2805
7/18/2009 -0.6655 -6.9641
7/25/2009 -0.3936 -3.6937
8/1/2009 -0.3463 -5.6457
8/8/2009 -0.3000 -1.7368
8/15/2009 0.2378 6.4600
8/22/2009 -0.2962 -3.1113
8/29/2009 -0.4346 -4.2039
9/5/2009 -0.6971 -7.8216
9/12/2009 -0.1217 5.1446
9/19/2009 -0.3107 2.0862
9/26/2009 -0.1797 -3.6055
10/3/2009 0.2299 -0.7373
*10/10/2009 0.4098 -10.1939*

When graphed on a scatter plot the bold faced data point significantly
reduces the robustness of my regression model. Question, is there a way in R
to run a p-value check on each added data point. So lets say given the range
of 7/4/2009- 10/03/2009 my p-value was .01; but then after adding 10/10/2009
to the data set my p-value increased to 0.4. At this point a conditional
statement could be made saying IF(p-value increase > z) then stop regression
at prior date.

Thanks for your help,

Rick

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] time series regression

2008-04-11 Thread bereket weldeslassie
 Hi Everyone,
I am doing a time series regression (one dependent time series variable, 7
independent time series variables and 32 annual observations). I have the
problem of cointegration, autocorrelation and multicollinearity. I am
considering an error correction model of the form:
diff(lnY(t))=a+b1*lnY(t-1)+b2*lnX(t-1)+b3*diff(lnX(t))+error
and not able to solve all problems.
Any suggestion how to built a good model that solves these problems? I
appreciate your help.
Thanks,
Bereket

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] time series regression

2008-04-10 Thread bereket weldeslassie
Dear,
I am doing a time series regression (one dependent time series variable, 7
independent time series variables and 32 annual observations). I have the
problem of cointegration, autocorrelation and multicollinearity. I am
considering an error correction model of the form:
diff(lnY(t))=a+b1*lnY(t-1)+b2*lnX(t-1)+b3*diff(lnX(t))+error
and not able to solve all problems.
Any suggestion how to built a good model that solves these problems? I
appreciate your help.
Thanks,
Bereket

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] time series regression

2008-03-20 Thread bereket weldeslassie
Hi Everyone,
I am trying to do a time series regression using the lm function. However,
according to the durbin watson test the errors are autocorrelated. And then
I tried to use the gls function to accomodate for the autocorrelated errors.
My question is how do I know what ARMA process (order) to use in the gls
function? Or is there any other way to do the time series regression in R? I
highly appreciate your help.
Thanks,
Bereket

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.