micsr-package {micsr} | R Documentation |
micsr : Microeconometrics with R
Description
The micsr package is the companion package to the book "Microeconometrics with R" (Chapman and Hall/CRC The R Series). It includes function to estimate and to test models, miscellanous tools and data sets:
Details
functions to estimate models:
-
binomreg
: binomial regression models, Rivers and Vuong (1988), -
bivprobit
: bivariate probit model -
clm
: constrained linear models, -
escount
: endogenous switching and selection model for count data, Terza (1998), -
expreg
: exponential conditional mean models, Mullahy (1997), -
loglm
: log-linear models, -
ordreg
: ordered regression models, -
poisreg
: poisson models, -
pscore
: matching, Dehejia and Wahba (2002), -
tobit1
: tobit-1 model, Tobin (1958), Smith and Blundel (1986), Powel (1986).
-
functions for statistical tests and diagnostic:
-
cmtest
: conditional moment tests, Newey (1985), Tauchen (1985), -
ftest
: F statistic, -
hausman
: Hausman's test, Hausman (1978), -
ndvuong
: non-degenerate Vuong test, Vuong (1989), Shi (2015), -
rsq
: different flavors of R squared, -
sargan
: Sargan's test, Sargan (1958), -
scoretest
: score, or Lagrange multiplier test.
-
miscellanous tools
-
gaze
: print a short summary of an object, -
dummy
: generate a set of dummy variables from a factor, -
newton
: Newton-Raphson optimization method, using the analytical gradient and hessian, -
mills
: compute the inverse mills ratio and its first two derivatives, -
stder
: extract the standard errors of a fitted model, -
npar
: extract the number of parameters in a fitted model.
-
data sets:
-
apples
: Apple production, Ivaldi and al. (1996), constrained linear model, -
birthwt
: Cigarette smoking and birth weigth, Mullahy (1997), exponentional conditional mean regression model, -
charitable
: Intergenerational transmission of charitable giving, Wilhem (2008), Tobit-1 model, -
cigmales
: Cigarettes consumption and smoking habits, Mullahy (1997), exponentional conditional mean regression mdodel, -
drinks
: Physician advice on alcohol consumption, Kenkel and Terza (2001), endogenous switching model for count data, -
ferediv
: Foreign exchange derivatives use by large US bank holding companies, Adkins (2012), instrumental variable probit model, -
fin_reform
: Political economy of financial reforms, Abiad and Mody (2005), ordered regression model, -
housprod
: Household production, Kerkhofs and Kooreman (2003), bivariate probit model, -
mode_choice
: Choice between car and transit, Horowitz (1993), probit model, -
trade_protection
: Lobying and trade protection, Atschke and Sherlund (2006), instrumental variable Tobit-1 model, -
trips
: Determinants of household trip taking, Terza (1998), endogenous switching model for count data, -
turnout
: Turnout in Texas liquor referenda, Coate and Conlin (2004), non-degenerate Vuong test, -
twa
: Temporary help jobs and permanent employment, Ichino, Mealli and Nannicini (2008), matching.
-
vignettes:
charitable: Estimating the Tobit-1 model with the charitable data set
escount: Endogenous switching or sample selection models for count data
expreg: Exponentional conditional mean models with endogeneity
ndvvuong: Implementation of Shi's non-degeranate Vuong test
We tried to keep the sets of package on which micsr depends on as small as possible. micsr depends on Formula, generics, Rdpack, knitr, sandwich and on a subset of the tidyverse metapackage (ggplot2, dplyr, purrr, tidyselect, magrittr, tibble, rlang). We borrowed the gaussian quadrature function from the statmod package (Smyth and al., 2023), and the distribution function of quadratic forms in normal variables from the CompQuadForm package (Duchesne and Lafaye, 2010).
References
Abiad A, Mody A (2005). “Financial Reform: What Shakes It? What Shapes It?” American Economic Review, 95(1), 66-88.
Adkins LC (2012). “Testing parameter significance in instrumental variables probit estimators: some simulation.” Journal of Statistical Computation and Simulation, 82(10), 1415-1436.
Coate S, Conlin M (2004). “A Group Rule-Utilitarian Approach to Voter Turnout: Theory and Evidence.” American Economic Review, 94(5), 1476-1504.
Dehejia RH, Wahba S (2002). “Propensity Score-Matching Methods for Nonexperimental Causal Studies.” The Review of Economics and Statistics, 84(1), 151-161. ISSN 0034-6535, doi:10.1162/003465302317331982.
Duchesne P, de Micheaux PL (2010). “Computing the distribution of quadratic forms: Further comparisons between the Liu-Tang-Zhang approximation and exact methods.” Computational Statistics and Data Analysis, 54, 858-862.
Hausman JA (1978). “Specification Tests in Econometrics.” Econometrica, 46(6), 1251–1271.
Ichino A, Mealli F, Nannicini T (2008). “From Temporary Help Jobs to Permanent Employment: What Can We Learn from Matching Estimators and Their Sensitivity?” Journal of Applied Econometrics, 23(3), 305–327.
Ivaldi M, Ladoux N, Ossard H, Simioni M (1996). “Comparing Fourier and translog specifications of multiproduct technology: Evidence from an incomplete panel of French farmers.” Journal of Applied Econometrics, 11(6), 649–667. doi:10.1002/(sici)1099-1255(199611)11:6<649::aid-jae416>3.0.co;2-4, http://dx.doi.org/10.1002/(sici)1099-1255(199611)11:6<649::aid-jae416>3.0.co;2-4.
Kenkel DS, Terza JV (2001). “The effect of physician advice on alcohol consumption: count regression with an endogenous treatment effect.” Journal of Applied Econometrics, 16(2), 165-184.
Kerkhofs M, Kooreman P (2003). “Identification and Estimation of a Class of Household Production Models.” Journal of Applied Econometrics, 18(3), 337–369.
Matschke X, Sherlund SM (2006). “Do Labor Issues Matter in the Determination of U.S. Trade Policy? An Empirical Reevaluation.” American Economic Review, 96(1), 405-421.
Mullahy J (1997). “Instrumental-Variable Estimation of Count Data Models: Applications to Models of Cigarette Smoking Behavior.” The Review of Economics and Statistics, 79(4), 586-593.
Newey WK (1985). “Maximum Likelihood Specification Testing and Conditional Moment Tests.” Econometrica, 53(5), 1047–1070.
Powell J (1986). “Symmetrically trimed least squares estimators for tobit models.” Econometrica, 54, 1435–1460.
Rivers D, Vuong QH (1988). “Limited information estimators and exogeneity tests for simultaneous probit models.” Journal of Econometrics, 39(3), 347-366.
Sargan JD (1958). “The Estimation of Economic Relationships using Instrumental Variables.” Econometrica, 26(3), 393–415.
Shi X (2015). “A nondegenerate Vuong test.” Quantitative Economics, 85-121.
Smith R, Blundell R (1986). “An Exogeneity Test for a Simultaneous Equation Tobit Model with an Application to Labor Supply.” Econometrica, 54(3), 679-85.
Smyth G, Chen L, Hu Y, Dunn P, Phipson B, Chen Y (2023). statmod: Statistical Modeling. R package version 1.5.0, https://CRAN.R-project.org/package=statmod.
Tauchen G (1985). “Diagnostic testing and evaluation of maximum likelihood models.” Journal of Econometrics, 30(1), 415-443.
Terza JV (1998). “Estimating count data models with endogenous switching: Sample selection and endogenous treatment effects.” Journal of Econometrics, 84(1), 129-154.
Tobin J (1958). “Estimation of Relationships for Limited Dependent Variables.” Econometrica, 26(1), 24-36.
Vuong QH (1989). “Likelihood Ratio Tests for Selection and Non-Nested Hypotheses.” Econometrica, 57(2), 397-333.
Wilhelm MO (2008). “Practical Considerations for Choosing Between Tobit and SCLS or CLAD Estimators for Censored Regression Models with an Application to Charitable Giving.” Oxford Bulletin of Economics and Statistics, 70(4), 559-582.