CRAN Task View: Computational Econometrics
|Contact:||Achim.Zeileis at R-project.org|
Base R ships with a lot of functionality useful for computational
econometrics, in particular in the stats package. This
functionality is complemented by many packages on CRAN, a brief overview
is given below. There is also a considerable overlap between the tools
for econometrics in this view and for finance in the
is a suitable mailing list for obtaining help
and discussing questions about both computational finance and econometrics.
Finally, there is also some overlap with the
also covers a broad variety of tools for social sciences, e.g., including political science.
The packages in this view can be roughly structured into the following topics.
If you think that some package is missing from the list, please let me know.
Linear regression models
Linear models can be fitted (via OLS) with
(from stats) and standard tests for model comparisons are available in various
methods such as
that also support asymptotic tests (
Chi-squared instead of
tests) and plug-in of other covariance
Tests of more general linear hypotheses are implemented in
HC and HAC covariance matrices that can be plugged
into these functions are available in
Diagnost checking: The packages
provide a large collection
of regression diagonstics and diagnostic tests.
Instrumental variables regression (two-stage least squares) is
AER, another implementation
Many standard microeconometric models belong to the
family of generalized linear models (GLM) and can be fitted by
from package stats. This includes in particular logit and probit models
for modeling choice data and poisson models for count data. Effects for typical
values of regressors in these models can be obtained and visualized using
Marginal effects tables for certain GLMs can be obtained using the
Negative binomial GLMs are available via
Another implementation of negative binomial models
is provided by
aod, which also contains other models for overdispersed
Zero-inflated and hurdle count models are provided in package
Multinomial responses: Multinomial models
with individual-specific covariates only are available in
nnet. Implementations with both individual- and
choice-specific variables are
mnlogit. Generalized additive models
(GAMs) for multinomial responses can be fitted with the
A Bayesian approach to multinomial probit models is provided by
Various Bayesian multinomial models (including logit and probit) are available
bayesm. Furthermore, the package
hierarchical Bayesian specifications based on direct specification of the likelihood
Ordered responses: Proportional-odds regression for ordered responses is implemented
MASS. The package
provides cumulative link models for ordered data which encompasses proportional
odds models but also includes more general specifications. Bayesian ordered probit
models are provided by
Censored responses: Basic censored regression models (e.g., tobit models)
can be fitted by
survival, a convenience
is in package
AER. Further censored
regression models, including models for panel data, are provided in
Interval regression models are in
intReg. Censored regression models with
conditional heteroskedasticity are in
Furthermore, hurdle models for left-censored data at zero can be estimated with
mhurdle. Models for sample selection are available in
and semiparametric extensions of these are provided by
Instrumental variables for binary responses: The
local average response functions for binary treatments and binary instruments.
Multivariate probit models: Estimation and marginal effect computations can be
carried out with
Miscellaneous: Further more refined tools for microecnometrics are provided in
family of packages: Analysis with
Cobb-Douglas, translog, and quadratic functions is in
the constant elasticity of scale (CES) function is in
the symmetric normalized quadratic profit (SNQP) function is in
The almost ideal demand system (AIDS) is in
Stochastic frontier analysis is in
implements a Bayesian
approach to microeconometrics and marketing. Inference for relative
distributions is contained in package
Further regression models
Nonlinear least squares modeling is availble in
in package stats.
(including linear, nonlinear, censored,
locally polynomial and additive quantile regressions).
Linear models for panel data:
plm, providing a wide range of within,
between, and random-effect methods (among others) along with corrected standard
errors, tests, etc. For panel-corrected standard errors in OLS and GEE models,
pcse. Estimation of linear models with
multiple group fixed effects is contained in
Generalized method of moments (GMM) and generalized empirical likelihood (GEL):
Spatial econometric models: The
view gives details about
handling spatial data, along with information about (regression) modeling. In particular,
spatial regression models can be fitted using
latter using a GMM approach).
is a package for spatial panel
models. Spatial probit models are available in
Linear structural equation models:
(including two-stage least squares).
Simultaneous equation estimation:
Nonparametric kernel methods:
Truncated (Gaussian) regression:
Nonlinear mixed-effect models:
Generalized additive models (GAMs):
Mixed data sampling regression:
Miscellaneous: The packages
provide several tools for extended
handling of (generalized) linear regression models.
is a unified
easy-to-use interface to a wide range of regression models.
Basic time series infrastructure
task view provides much more detailed
information. Here, only the most important aspects are briefly mentioned.
in package stats is R's standard class for
regularly spaced time series (especially annual, quarterly, and monthly data).
Time series in
format can be
coerced back and forth without loss of information to
provides infrastructure for
both regularly and irregularly spaced time series (the latter via the class
"zoo") where the time information can be of arbitrary class.
This includes daily series (typically with
or intra-day series (e.g., with
other implementations of irregular time series building on the
time-date class are available in
(previously: fSeries) which are all aimed particularly at
finance applications. See the
task view for
Time series modeling
task view contains detailed information about time series analysis in R.
Time series models for financial econometrics (e.g., GARCH, stochastic volatility models, or
stochastic differential equations, etc.) are described in the
Finance. Here, only a brief overview
of the most important methods for econometrics is given.
Classical time series modeling tools are
contained in the stats package and include
for ARIMA modeling
and Box-Jenkins-type analysis.
Fitting linear regression models with AR error terms via OLS is possible
Structural time series models are provided by
Filtering and decomposition for time series is available in
Extensions to these
methods, in particular for forecasting and model selection, are provided in
Miscellaneous time series filters are available in
For estimating VAR models, several
methods are available: simple models can be fitted by
in stats, more
elaborate models are provided in package
and a Bayesian approach is available in
convenient interface for fitting dynamic regression models via OLS is available
dynlm; a different approach
that also works with other regression functions is implemented in
More advanced dynamic system equations can be fitted using
Periodic autoregressive models are provided by
Gaussian linear state space models can be fitted using
(via maximum likelihood,
Kalman filtering/smoothing and Bayesian methods).
Unit root and cointegration techniques are available in
Time series factor analysis is available in
Asymmetric price transmission modeling is available in
contain a comprehensive collections of data sets from various standard econometric
textbooks as well as several data sets from the Journal of
Applied Econometrics and the Journal of Business & Economic Statistics
additionally provides an extensive set of
examples reproducing analyses from the textbooks/papers, illustrating
various econometric methods.
is the R companion to Tsay's 'Analysis of
Financial Time Series' (2nd ed., 2005, Wiley) containing data sets, functions
and script files required to work some of the examples.
provides Canadian monetary aggregates.
provides the Penn World Table from versions 5.6, 6.x, 7.x. The version 8.x
data are available in
data packages with time series data
from the books 'Forecasting with Exponential Smoothing: The State Space Approach'
(Hyndman, Koehler, Ord, Snyder, 2008, Springer) and 'Forecasting: Methods and Applications'
(Makridakis, Wheelwright, Hyndman, 3rd ed., 1998, Wiley) and the M-competitions,
contains functions and datasets for the book of
'Empirical Research in Economics: Growing up with R' (Sun, forthcoming).
available from GitHub can build panel data
sets from the Panel Study of Income Dynamics (PSID).
: As a vector- and matrix-based language, base R
ships with many powerful tools for doing matrix manipulations, which are
complemented by the packages
Optimization and mathematical programming
: R and many of its contributed
packages provide many specialized functions for solving particular optimization
problems, e.g., in regression as discussed above. Further functionality for
solving more general optimization problems, e.g., likelihood maximization, is
discussed in the the
: In addition to the recommended
there are some other general bootstrapping techniques available in
as well some bootstrap techniques
designed for time-series data, such as the maximum entropy bootstrap in
: For measuring inequality, concentration and poverty the
provides some basic tools such as Lorenz curves,
Pen's parade, the Gini coefficient and many more.
: R is particularly strong when dealing with
structural changes and changepoints in parametric models, see
Exchange rate regimes
: Methods for inference about exchange
rate regimes, in particular in a structural change setting, are provided