Title: | Estimate Procedure in Case of First Order Autocorrelation |
---|---|
Description: | Solve first order autocorrelation problems using an iterative method. This procedure estimates both autocorrelation and beta coefficients recursively until we reach the convergence (8th decimal as default). The residuals are computed after estimating Beta using EGLS approach and Rho is estimated using the previous residuals. |
Authors: | Stefano Spada [aut, cre], Matteo Quartagno [ctb], Marco Tamburini [ctb], David Robinson [ctb] |
Maintainer: | Stefano Spada <[email protected]> |
License: | GPL-2 |
Version: | 2.3 |
Built: | 2024-11-05 06:51:46 UTC |
Source: | CRAN |
This package has been implemented to solve first order autocorrelation problems using an iterative method. This procedure estimates both autocorrelation and beta coefficients recursively until we reach the convergence (8th decimal). The residuals are computed after estimating Beta using EGLS approach and Rho is estimated using the previous residuals.
Package: | orcutt |
Type: | Package |
Version: | 2.3 |
Date: | 2018-09-27 |
License: | GPL-2 |
Stefano Spada [aut, cre], Matteo Quartagno [ctb], Marco Tamburini [ctb], David Robinson [ctb]
Maintainer: Stefano Spada <[email protected]>
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd, ISBN:978-88-08-17054-5
Interactive method using to solve first order autocorrelation problems. This procedure estimates both autocorrelation and beta coefficients recursively until we reach the convergence (8th decimal). The residuals are computed after estimating Beta using EGLS approach and Rho is estimated using the previous residuals
cochrane.orcutt(reg, convergence = 8, max.iter=100)
cochrane.orcutt(reg, convergence = 8, max.iter=100)
reg |
a linear model built with lm function |
convergence |
decimal value to reach for convergence, 8 as default |
max.iter |
the maximum number of interactions, 100 as default |
An object of class "orcutt", basically a list including elements
coefficients |
a named vector of coefficients. |
residuals |
residuals. |
fitted.values |
the fitted mean values. |
t.value |
t test of coefficients. |
p.value |
p-value of coefficients. |
call |
the matched call. |
rho |
Spearman's rho autocorrelation. |
number.interaction |
number of interaction of the model. |
DW |
vector contained Durbin-Watson statistics and p-value. |
Stefano Spada
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd, ISBN:978-88-08-17054-5
data(icecream, package="orcutt") lm = lm(cons ~ price + income + temp, data=icecream) coch = cochrane.orcutt(lm) coch
data(icecream, package="orcutt") lm = lm(cons ~ price + income + temp, data=icecream) coch = cochrane.orcutt(lm) coch
four weekly observations from 1951-03-18 to 1953-07-11 in United States (30 observations)
data("icecream")
data("icecream")
A data frame with 30 observations on the following 4 variables.
price
price of ice cream (per pint);
cons
consumption of ice cream per head (in pints);
income
average family income per week (in US Dollars);
temp
average temperature (in Fahrenheit);
Hildreth, C. and J. Lu (1960) Demand relations with autocorrelated disturbances, Technical Bulletin No 2765, Michigan State University.
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
data(icecream) summary(icecream)
data(icecream) summary(icecream)
Predicted values based on orcutt object.
## S3 method for class 'orcutt' predict(object, ...)
## S3 method for class 'orcutt' predict(object, ...)
object |
An "orcutt" object build with Cochrane-Orcutt fuction |
... |
further arguments passed to or from other methods. |
Stefano Spada
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
data(icecream, package="orcutt") lm = lm(cons ~ price + income + temp, data=icecream) coch = cochrane.orcutt(lm) predict.coch = predict(coch)
data(icecream, package="orcutt") lm = lm(cons ~ price + income + temp, data=icecream) coch = cochrane.orcutt(lm) predict.coch = predict(coch)
Print Cochrane-Orcutt Estimation
## S3 method for class 'orcutt' print(x, ...)
## S3 method for class 'orcutt' print(x, ...)
x |
an orcutt object |
... |
additional arguments for specific methods. |
Stefano Spada
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
data(icecream, package="orcutt") lm = lm(cons ~ price + income + temp, data=icecream) coch = cochrane.orcutt(lm) coch
data(icecream, package="orcutt") lm = lm(cons ~ price + income + temp, data=icecream) coch = cochrane.orcutt(lm) coch
summary method for class "orcutt".
## S3 method for class 'summary.orcutt' print(x, ...)
## S3 method for class 'summary.orcutt' print(x, ...)
x |
an object of class "orcutt", usually, a result of a call to cochrane.orcutt. |
... |
further arguments passed to or from other methods. |
The function summary.orcutt computes and returns a list of summary statistics of the fitted Cochrane-Orcutt.
coefficients |
a p x 4 matrix with columns for the estimated coefficient, its standard error, t-statistic and corresponding (two-sided) p-value. Aliased coefficients are omitted. |
fstatistic |
value of F statistic. |
df |
degrees of freedom of F statistic. |
r.squared |
R^2, the fraction of variance explained by the model. |
adj.r.squared |
the above R^2 statistic adjusted, penalizing for higher p. |
DW.t |
a 4-vector contained the Durbin-Watson statistic and the p-value for the original "lm" model, and the Durbin-Watson statistic and the p-value for the original "orcutt" model . |
Stefano Spada
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
##-- Continuing the cochrane.orcutt(.) example: summary(coch)
##-- Continuing the cochrane.orcutt(.) example: summary(coch)
Residual for Cochrane-Orcutt Estimation
residual.orcutt(object, ...)
residual.orcutt(object, ...)
object |
An "orcutt" object build with Cochrane-Orcutt fuction |
... |
further arguments passed to or from other methods. |
Stefano Spada
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
data(icecream, package="orcutt") lm = lm(cons ~ price + income + temp, data=icecream) coch = cochrane.orcutt(lm) residuals(coch)
data(icecream, package="orcutt") lm = lm(cons ~ price + income + temp, data=icecream) coch = cochrane.orcutt(lm) residuals(coch)
summary method for class "orcutt".
## S3 method for class 'orcutt' summary(object, ...)
## S3 method for class 'orcutt' summary(object, ...)
object |
an object of class "orcutt", usually, a result of a call to cochrane.orcutt. |
... |
further arguments passed to or from other methods. |
The function summary.orcutt computes and returns a list of summary statistics of the fitted Cochrane-Orcutt
coefficients |
a p x 4 matrix with columns for the estimated coefficient, its standard error, t-statistic and corresponding (two-sided) p-value. Aliased coefficients are omitted. |
fstatistic |
value of F statistic. |
df |
degrees of freedom of F statistic. |
r.squared |
R^2, the fraction of variance explained by the model. |
adj.r.squared |
the above R^2 statistic adjusted, penalizing for higher p. |
DW.t |
a 4-vector contained the Durbin-Watson statistic and the p-value for the original "lm" model, and the Durbin-Watson statistic and the p-value for the original "orcutt" model . |
Stefano Spada
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
##-- Continuing the cochrane.orcutt(.) example: summary(coch)
##-- Continuing the cochrane.orcutt(.) example: summary(coch)