Automation of tasks
Posted: Wed Jan 20, 2010 11:26 am
Hello All,
I am trying to write a programme in EViews which will automate the procedure to detect, then remove, the presence of serial correlation in a time series. Specifically, I need to automate the following tasks:
1. The user enters a table of data, with each column containing a different time series. EViews creates a new, blank table called 'new'. Call the table entered by the user 'old'.
2. For each time series entered by the user in the 'old' table, Eviews automatically runs View -> Correlogram -> Levels (with 6 lags) -> OK.
3. If the first 'prob' value in the last column is more than 0.05, go to step 4. Otherwise, go to step 5.
4. 'prob' is more than 0.05. Copy the whole time series except the first datapoint into the corresponding column in the 'new' table.
5. 'prob' is less than 0.05. Suppose the series is called x.
(i) Select two series in the workfile, Open As Equation, and type:
x x(-1) c
(ii) Copy the coefficient for x(-1), and assign it to a new variable called b.
(iii) In the command line, type: x_us = (x-b*x(-1))/(1-b)
where x is still the name of the series.
(iv) Open the new series, x_us, and view the correlogram as in step 2. In most cases, the 'prob' value will now be more than 0.05.
(v) Copy and paste the x_us series into the correct column in the 'new' table.
As I have never written a programme in EViews before, I am trying to understand how to write this. In particular, how do you "read" a correlogram from each series in an input? Is there a way of seeing automatically whether the p value is less than 0.05?
I would be very grateful for any suggestions.
I am trying to write a programme in EViews which will automate the procedure to detect, then remove, the presence of serial correlation in a time series. Specifically, I need to automate the following tasks:
1. The user enters a table of data, with each column containing a different time series. EViews creates a new, blank table called 'new'. Call the table entered by the user 'old'.
2. For each time series entered by the user in the 'old' table, Eviews automatically runs View -> Correlogram -> Levels (with 6 lags) -> OK.
3. If the first 'prob' value in the last column is more than 0.05, go to step 4. Otherwise, go to step 5.
4. 'prob' is more than 0.05. Copy the whole time series except the first datapoint into the corresponding column in the 'new' table.
5. 'prob' is less than 0.05. Suppose the series is called x.
(i) Select two series in the workfile, Open As Equation, and type:
x x(-1) c
(ii) Copy the coefficient for x(-1), and assign it to a new variable called b.
(iii) In the command line, type: x_us = (x-b*x(-1))/(1-b)
where x is still the name of the series.
(iv) Open the new series, x_us, and view the correlogram as in step 2. In most cases, the 'prob' value will now be more than 0.05.
(v) Copy and paste the x_us series into the correct column in the 'new' table.
As I have never written a programme in EViews before, I am trying to understand how to write this. In particular, how do you "read" a correlogram from each series in an input? Is there a way of seeing automatically whether the p value is less than 0.05?
I would be very grateful for any suggestions.