Type: | Package |
Title: | Estimate Procedure in Case of First Order Autocorrelation |
Version: | 2.3 |
Date: | 2018-09-27 |
Depends: | lmtest |
Imports: | stats |
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. |
License: | GPL-2 |
NeedsCompilation: | no |
Packaged: | 2018-09-27 19:41:51 UTC; Stefano |
Author: | Stefano Spada [aut, cre], Matteo Quartagno [ctb], Marco Tamburini [ctb], David Robinson [ctb] |
Maintainer: | Stefano Spada <lostefanospada@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2018-09-27 22:40:04 UTC |
Estimate Procedure in Case of First Order Autocorrelation
Description
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.
Details
Package: | orcutt |
Type: | Package |
Version: | 2.3 |
Date: | 2018-09-27 |
License: | GPL-2 |
Author(s)
Stefano Spada [aut, cre], Matteo Quartagno [ctb], Marco Tamburini [ctb], David Robinson [ctb]
Maintainer: Stefano Spada <lostefanospada@gmail.com>
References
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd, ISBN:978-88-08-17054-5
Cochrane-Orcutt Estimation
Description
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
Usage
cochrane.orcutt(reg, convergence = 8, max.iter=100)
Arguments
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 |
Value
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. |
Author(s)
Stefano Spada
References
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd, ISBN:978-88-08-17054-5
Examples
data(icecream, package="orcutt")
lm = lm(cons ~ price + income + temp, data=icecream)
coch = cochrane.orcutt(lm)
coch
Ice Cream Consumption
Description
four weekly observations from 1951-03-18 to 1953-07-11 in United States (30 observations)
Usage
data("icecream")
Format
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);
Source
Hildreth, C. and J. Lu (1960) Demand relations with autocorrelated disturbances, Technical Bulletin No 2765, Michigan State University.
References
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
Examples
data(icecream)
summary(icecream)
Predict method for Cochrane-Orcutt Estimation
Description
Predicted values based on orcutt object.
Usage
## S3 method for class 'orcutt'
predict(object, ...)
Arguments
object |
An "orcutt" object build with Cochrane-Orcutt fuction |
... |
further arguments passed to or from other methods. |
Author(s)
Stefano Spada
References
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
Examples
data(icecream, package="orcutt")
lm = lm(cons ~ price + income + temp, data=icecream)
coch = cochrane.orcutt(lm)
predict.coch = predict(coch)
Print Cochrane-Orcutt Estimation
Description
Print Cochrane-Orcutt Estimation
Usage
## S3 method for class 'orcutt'
print(x, ...)
Arguments
x |
an orcutt object |
... |
additional arguments for specific methods. |
Author(s)
Stefano Spada
References
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
Examples
data(icecream, package="orcutt")
lm = lm(cons ~ price + income + temp, data=icecream)
coch = cochrane.orcutt(lm)
coch
Summarizing Cochrane-Orcutt Fits
Description
summary method for class "orcutt".
Usage
## S3 method for class 'summary.orcutt'
print(x, ...)
Arguments
x |
an object of class "orcutt", usually, a result of a call to cochrane.orcutt. |
... |
further arguments passed to or from other methods. |
Value
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 . |
Author(s)
Stefano Spada
References
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
Examples
##-- Continuing the cochrane.orcutt(.) example:
summary(coch)
Accessing Cochrane-Orcutt Fits
Description
Residual for Cochrane-Orcutt Estimation
Usage
residual.orcutt(object, ...)
Arguments
object |
An "orcutt" object build with Cochrane-Orcutt fuction |
... |
further arguments passed to or from other methods. |
Author(s)
Stefano Spada
References
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
Examples
data(icecream, package="orcutt")
lm = lm(cons ~ price + income + temp, data=icecream)
coch = cochrane.orcutt(lm)
residuals(coch)
Summarizing Cochrane-Orcutt Fits
Description
summary method for class "orcutt".
Usage
## S3 method for class 'orcutt'
summary(object, ...)
Arguments
object |
an object of class "orcutt", usually, a result of a call to cochrane.orcutt. |
... |
further arguments passed to or from other methods. |
Value
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 . |
Author(s)
Stefano Spada
References
Verbeek M. (2004) A guide to modern econometrics, John Wiley & Sons Ltd
Examples
##-- Continuing the cochrane.orcutt(.) example:
summary(coch)