diff -Nru sandwich-2.2-10/DESCRIPTION sandwich-2.3-0/DESCRIPTION --- sandwich-2.2-10/DESCRIPTION 2013-03-29 11:06:42.000000000 +0000 +++ sandwich-2.3-0/DESCRIPTION 2013-10-05 15:24:09.000000000 +0000 @@ -1,22 +1,18 @@ Package: sandwich -Version: 2.2-10 -Date: 2013-03-29 +Version: 2.3-0 +Date: 2013-10-05 Title: Robust Covariance Matrix Estimators -Authors@R: c(person(given = "Thomas", family = "Lumley", role = "aut", - email = "tlumley@u.washington.edu"), person(given = "Achim", - family = "Zeileis", role = c("aut", "cre"), email = - "Achim.Zeileis@R-project.org")) -Author: Thomas Lumley [aut], Achim Zeileis [aut, cre] -Maintainer: Achim Zeileis -Description: Model-robust standard error estimators for - cross-sectional, time series and longitudinal data. -LazyLoad: yes -LazyData: yes -Depends: R (>= 2.0.0), stats, zoo +Authors@R: c(person(given = "Thomas", family = "Lumley", role = "aut", email = "tlumley@u.washington.edu"), + person(given = "Achim", family = "Zeileis", role = c("aut", "cre"), email = "Achim.Zeileis@R-project.org")) +Description: Model-robust standard error estimators for cross-sectional, time series, and longitudinal data. +Depends: R (>= 2.0.0) +Imports: stats, zoo Suggests: car, lmtest, strucchange, AER, survival, MASS, scatterplot3d -Imports: stats License: GPL-2 -Packaged: 2013-03-29 10:58:26 UTC; zeileis +Packaged: 2013-10-05 10:40:33 UTC; zeileis +Author: Thomas Lumley [aut], + Achim Zeileis [aut, cre] +Maintainer: Achim Zeileis NeedsCompilation: no Repository: CRAN -Date/Publication: 2013-03-29 12:06:42 +Date/Publication: 2013-10-05 17:24:09 diff -Nru sandwich-2.2-10/MD5 sandwich-2.3-0/MD5 --- sandwich-2.2-10/MD5 2013-03-29 11:06:42.000000000 +0000 +++ sandwich-2.3-0/MD5 2013-10-05 15:24:09.000000000 +0000 @@ -1,6 +1,6 @@ -4011b78ecf8b41b5f6c51bc2f64c51e1 *DESCRIPTION -e9dc18ff7b54ec5c386e7c229e6fc07e *NAMESPACE -8254f82b33d6bd966069603d1894ee65 *NEWS +d9056b83e9f52c4142a554e8498b1b8a *DESCRIPTION +c810ec63931b3c5c47596690af49dc43 *NAMESPACE +65f8858c4cf060c503e66ed69124131f *NEWS 328a74e02b182b46397ac2c15cf1526e *R/auxiliary.R 44fb845b1fc5979686460fbb6a6000ad *R/bread.R 051f7665ccc9dbf074a43d1c03b1fc97 *R/estfun.R @@ -9,31 +9,33 @@ f1e1422995194e2a01d21b46463ded36 *R/vcovHAC.R fb5e3ddf78e16158247fe696ffe2c0eb *R/vcovHC.R d34322a713ad0c407146243a3d579a94 *THANKS -c79dd73ec5b18a48e18f84467ef37f3b *data/Investment.rda -f709c21f61aa18982fe46b8f0fa1b7ec *data/PublicSchools.rda -89dd48e1103483ad76714fe362e266b9 *inst/CITATION -4b7e383d427039018b749a23de8d10a4 *inst/doc/sandwich-OOP.Rnw -5bafeff6e5c2255593aaf24fab89d154 *inst/doc/sandwich-OOP.pdf -b6e5a8323c122fe95ecbcd2ac403022e *inst/doc/sandwich.Rnw -44e9361f6aaffbcd571a437d3b226bd4 *inst/doc/sandwich.pdf +66414f215354de1d7eef1a782e2b737e *data/Investment.rda +0a47778ce12016f25618c2883a707699 *data/PublicSchools.rda +ba011c5e540580d01b7ad505a9aa6af0 *inst/CITATION +a2d0c9b14f1f21be4cb29ce51ac0111a *inst/doc/sandwich-OOP.R +66d361576791b0ff9dfa991446c555d0 *inst/doc/sandwich-OOP.Rnw +894b21a3356f4801942881761123ccb3 *inst/doc/sandwich-OOP.pdf +42cf835b312c0d9195c3afcdc299252a *inst/doc/sandwich.R +bbb243ce36ec5439d9ef13eab0471906 *inst/doc/sandwich.Rnw +8f77cbe05ecd6a090593044a228612b0 *inst/doc/sandwich.pdf 8edf9d1b19da929ec10350be5a132d65 *man/Investment.Rd 6cdaa2600bbb67c2cc5326663e107b37 *man/NeweyWest.Rd 68eea00a70c26688690150afa5de5210 *man/PublicSchools.Rd -a1306a139c8d5a7eec9ab148208d28d5 *man/bread.Rd +3e1c3c3057fdfb469d2e0907b7fbdd5c *man/bread.Rd 659f45eea782a8ef64887225fc3350e6 *man/estfun.Rd -17ac91e4c00b9c79517b2100800cd516 *man/isoacf.Rd +0fa862caf2f33da77ea03b02080dd9e8 *man/isoacf.Rd 4757339bc825d6908b14817c38d06923 *man/kweights.Rd 7874cc2c29c0229e0534cfbe9a9ceb5c *man/lrvar.Rd -5cab739bde8704e55000c4ea76be5fd7 *man/meat.Rd -707c878068b38198b5be365d3467d483 *man/sandwich.Rd -cd77bd3fcb743abff0a38a688baefe0d *man/vcovHAC.Rd -3b0d7abdc16d126b62aca6ff4cf0bf9f *man/vcovHC.Rd -8c0f96d22ee0beb6d2fab14943da8e3d *man/vcovOPG.Rd +6058540f46f70781fe98850d296796c5 *man/meat.Rd +8e601891b8284f932686355a7bb99be3 *man/sandwich.Rd +bf8ebfcbcb05af9d5c7d21448330724b *man/vcovHAC.Rd +4f379044f212916fd5ebad228ae42036 *man/vcovHC.Rd +99ae01bf7226c07decf6cca0e125018f *man/vcovOPG.Rd 1fc57bb8d5cbd49b8eb4f90002dba49d *man/weightsAndrews.Rd -99487aef840af2705b6a61d3f2ce60f7 *man/weightsLumley.Rd -e939b2ce27e463388e624e041f48dded *tests/Examples/sandwich-Ex.Rout.save +5ea2eebd9d1a4e86195570d260405166 *man/weightsLumley.Rd +a715e35f9190e27b2e0559a22da82c13 *tests/Examples/sandwich-Ex.Rout.save 337761064bdcd760b0ab75bb170c7fc8 *vignettes/hac.bib -4b7e383d427039018b749a23de8d10a4 *vignettes/sandwich-OOP.Rnw +66d361576791b0ff9dfa991446c555d0 *vignettes/sandwich-OOP.Rnw 0982a60ad260bfb71ab2dc560d00ceaa *vignettes/sandwich-OOP.Rout.save -b6e5a8323c122fe95ecbcd2ac403022e *vignettes/sandwich.Rnw +bbb243ce36ec5439d9ef13eab0471906 *vignettes/sandwich.Rnw b11061a269b3bc8a9fb119c6dcadc9f2 *vignettes/sandwich.Rout.save diff -Nru sandwich-2.2-10/NAMESPACE sandwich-2.3-0/NAMESPACE --- sandwich-2.2-10/NAMESPACE 2013-03-29 10:31:39.000000000 +0000 +++ sandwich-2.3-0/NAMESPACE 2013-10-04 10:52:26.000000000 +0000 @@ -1,4 +1,4 @@ -import("stats") +import("stats", "zoo") export( ## core ingredients diff -Nru sandwich-2.2-10/NEWS sandwich-2.3-0/NEWS --- sandwich-2.2-10/NEWS 2013-03-29 10:37:46.000000000 +0000 +++ sandwich-2.3-0/NEWS 2013-10-05 10:35:21.000000000 +0000 @@ -1,3 +1,8 @@ +Changes in Version 2.3-0 + + o Updated Depends/Imports: Package "zoo" is only in Imports now. + + Changes in Version 2.2-10 o Added estfun() and bread() methods for ordered response models Binary files /tmp/rn5oASZmG6/sandwich-2.2-10/data/Investment.rda and /tmp/viOUKD6EAC/sandwich-2.3-0/data/Investment.rda differ Binary files /tmp/rn5oASZmG6/sandwich-2.2-10/data/PublicSchools.rda and /tmp/viOUKD6EAC/sandwich-2.3-0/data/PublicSchools.rda differ diff -Nru sandwich-2.2-10/debian/changelog sandwich-2.3-0/debian/changelog --- sandwich-2.2-10/debian/changelog 2013-10-25 13:27:24.000000000 +0000 +++ sandwich-2.3-0/debian/changelog 2013-10-25 13:27:24.000000000 +0000 @@ -1,3 +1,11 @@ +sandwich (2.3-0-1) unstable; urgency=low + + * New upstream release + + * debian/control: Set Build-Depends: to current R version + + -- Dirk Eddelbuettel Sat, 05 Oct 2013 16:43:42 -0500 + sandwich (2.2-10-1) unstable; urgency=low * New upstream release diff -Nru sandwich-2.2-10/debian/control sandwich-2.3-0/debian/control --- sandwich-2.2-10/debian/control 2013-10-25 13:27:24.000000000 +0000 +++ sandwich-2.3-0/debian/control 2013-10-25 13:27:24.000000000 +0000 @@ -2,7 +2,7 @@ Section: gnu-r Priority: optional Maintainer: Dirk Eddelbuettel -Build-Depends: debhelper (>= 7.0.0), r-base-dev (>= 3.0.0~20130327), cdbs, r-cran-zoo +Build-Depends: debhelper (>= 7.0.0), r-base-dev (>= 3.0.2), cdbs, r-cran-zoo Standards-Version: 3.9.4 Package: r-cran-sandwich diff -Nru sandwich-2.2-10/inst/CITATION sandwich-2.3-0/inst/CITATION --- sandwich-2.2-10/inst/CITATION 2010-03-31 14:15:28.000000000 +0000 +++ sandwich-2.3-0/inst/CITATION 2013-09-23 08:58:34.000000000 +0000 @@ -18,7 +18,7 @@ ) citEntry(entry = "Article", - title = "Object-oriented Computation of Sandwich Estimators", + title = "Object-Oriented Computation of Sandwich Estimators", author = "Achim Zeileis", journal = "Journal of Statistical Software", year = "2006", @@ -29,7 +29,7 @@ textVersion = paste("Achim Zeileis (2006).", - "Object-oriented Computation of Sandwich Estimators.", + "Object-Oriented Computation of Sandwich Estimators.", "Journal of Statistical Software 16(9), 1-16.", "URL http://www.jstatsoft.org/v16/i09/."), header = "If sandwich is applied to models other than lm() also cite:" diff -Nru sandwich-2.2-10/inst/doc/sandwich-OOP.R sandwich-2.3-0/inst/doc/sandwich-OOP.R --- sandwich-2.2-10/inst/doc/sandwich-OOP.R 1970-01-01 00:00:00.000000000 +0000 +++ sandwich-2.3-0/inst/doc/sandwich-OOP.R 2013-10-05 10:40:27.000000000 +0000 @@ -0,0 +1,109 @@ +### R code from vignette source 'sandwich-OOP.Rnw' + +################################################### +### code chunk number 1: preliminaries +################################################### +library("AER") +library("MASS") +options(prompt = "R> ", continue = "+ ") + + +################################################### +### code chunk number 2: sandwich +################################################### +par(mar = rep(0, 4)) +plot(0, 0, xlim = c(0, 85), ylim = c(0, 110), type = "n", axes = FALSE, xlab = "", ylab = "") +lgrey <- grey(0.88) +dgrey <- grey(0.75) + +rect(45, 90, 70, 110, lwd = 2, col = dgrey) + +rect(20, 40, 40, 60, col = lgrey) +rect(30, 40, 40, 60, col = dgrey) +rect(20, 40, 40, 60, lwd = 2) + +rect(5, 0, 20, 20, lwd = 2, col = lgrey) +rect(22.5, 0, 37.5, 20, lwd = 2, col = lgrey) +rect(40, 0, 55, 20, lwd = 2, col = lgrey) +rect(40, 0, 55, 20, lwd = 2, col = lgrey) +rect(60, 0, 80, 20, col = lgrey) +rect(70, 0, 80, 20, col = dgrey) +rect(60, 0, 80, 20, lwd = 2) + +text(57.5, 100, "fitted model object\n(class: foo)") + +text(25, 50, "estfun") +text(35, 50, "foo") + +text(12.5, 10, "meatHC") +text(30, 10, "meatHAC") +text(47.5, 10, "meat") +text(65, 10, "bread") +text(75, 10, "foo") + +arrows(57.5, 89, 70, 21, lwd = 1.5, length = 0.15, angle = 20) +arrows(57.5, 89, 30, 61, lwd = 1.5, length = 0.15, angle = 20) +arrows(30, 39, 30, 21, lwd = 1.5, length = 0.15, angle = 20) +arrows(30, 39, 12.5, 21, lwd = 1.5, length = 0.15, angle = 20) +arrows(30, 39, 47.5, 21, lwd = 1.5, length = 0.15, angle = 20) + + +################################################### +### code chunk number 3: dgp +################################################### +set.seed(123) +x <- rnorm(250) +y <- rnbinom(250, mu = exp(1 + x), size = 1) + + +################################################### +### code chunk number 4: poisson +################################################### +fm_pois <- glm(y ~ x + I(x^2), family = poisson) +coeftest(fm_pois) + + +################################################### +### code chunk number 5: poisson-sandwich +################################################### +coeftest(fm_pois, vcov = sandwich) + + +################################################### +### code chunk number 6: quasipoisson +################################################### +fm_qpois <- glm(y ~ x + I(x^2), family = quasipoisson) +coeftest(fm_qpois) + + +################################################### +### code chunk number 7: negbin +################################################### +fm_nbin <- glm.nb(y ~ x + I(x^2)) +coeftest(fm_nbin) + + +################################################### +### code chunk number 8: sandwich-OOP.Rnw:626-631 +################################################### +library("AER") +data("Affairs", package = "AER") +fm_tobit <- tobit(affairs ~ age + yearsmarried + religiousness + occupation + rating, data = Affairs) +fm_probit <- glm(I(affairs > 0) ~ age + yearsmarried + religiousness + occupation + rating, + data = Affairs, family = binomial(link = "probit")) + + +################################################### +### code chunk number 9: sandwich-OOP.Rnw:638-640 +################################################### +coeftest(fm_tobit) +coeftest(fm_tobit, vcov = sandwich) + + +################################################### +### code chunk number 10: sandwich-OOP.Rnw:648-650 +################################################### +coeftest(fm_probit) +coeftest(fm_probit, vcov = sandwich) + + diff -Nru sandwich-2.2-10/inst/doc/sandwich-OOP.Rnw sandwich-2.3-0/inst/doc/sandwich-OOP.Rnw --- sandwich-2.2-10/inst/doc/sandwich-OOP.Rnw 2013-03-29 10:58:20.000000000 +0000 +++ sandwich-2.3-0/inst/doc/sandwich-OOP.Rnw 2013-10-05 10:40:27.000000000 +0000 @@ -5,10 +5,10 @@ %% Symbols \newcommand{\darrow}{\stackrel{\mbox{\tiny \textnormal{d}}}{\longrightarrow}} -\author{Achim Zeileis\\Wirtschaftsuniversit\"at Wien} +\author{Achim Zeileis\\Universit\"at Innsbruck} \Plainauthor{Achim Zeileis} -\title{Object-oriented Computation of Sandwich Estimators} +\title{Object-Oriented Computation of Sandwich Estimators} \Keywords{covariance matrix estimators, estimating functions, object orientation, \proglang{R}} \Plainkeywords{covariance matrix estimators, estimating functions, object orientation, R} @@ -34,18 +34,19 @@ \Address{ Achim Zeileis\\ - Department of Statistics and Mathematics\\ - WU Wirtschaftsuniversit\"at Wien\\ - Augasse 2--9\\ - 1090 Wien, Austria\\ + Department of Statistics\\ + Faculty of Economics and Statistics\\ + Universit\"at Innsbruck\\ + Universit\"atsstr.~15\\ + 6020 Innsbruck, Austria\\ E-mail: \email{Achim.Zeileis@R-project.org}\\ - URL: \url{http://statmath.wu.ac.at/~zeileis/} + URL: \url{http://eeecon.uibk.ac.at/~zeileis/} } \begin{document} \SweaveOpts{engine=R,eps=FALSE} -%\VignetteIndexEntry{Object-oriented Computation of Sandwich Estimators} +%\VignetteIndexEntry{Object-Oriented Computation of Sandwich Estimators} %\VignetteDepends{sandwich,zoo,AER,survival,MASS,lmtest} %\VignetteKeywords{covariance matrix estimators, estimating functions, object orientation, R} %\VignettePackage{sandwich} Binary files /tmp/rn5oASZmG6/sandwich-2.2-10/inst/doc/sandwich-OOP.pdf and /tmp/viOUKD6EAC/sandwich-2.3-0/inst/doc/sandwich-OOP.pdf differ diff -Nru sandwich-2.2-10/inst/doc/sandwich.R sandwich-2.3-0/inst/doc/sandwich.R --- sandwich-2.2-10/inst/doc/sandwich.R 1970-01-01 00:00:00.000000000 +0000 +++ sandwich-2.3-0/inst/doc/sandwich.R 2013-10-05 10:40:27.000000000 +0000 @@ -0,0 +1,257 @@ +### R code from vignette source 'sandwich.Rnw' + +################################################### +### code chunk number 1: preliminaries +################################################### +library("zoo") +library("sandwich") +library("strucchange") +library("lmtest") +options(prompt = "R> ", continue = "+ ") + + +################################################### +### code chunk number 2: hac-kweights +################################################### +curve(kweights(x, kernel = "Quadratic", normalize = TRUE), + from = 0, to = 3.2, xlab = "x", ylab = "K(x)") +curve(kweights(x, kernel = "Bartlett", normalize = TRUE), + from = 0, to = 3.2, col = 2, add = TRUE) +curve(kweights(x, kernel = "Parzen", normalize = TRUE), + from = 0, to = 3.2, col = 3, add = TRUE) +curve(kweights(x, kernel = "Tukey", normalize = TRUE), + from = 0, to = 3.2, col = 4, add = TRUE) +lines(c(0, 0.5), c(1, 1), col = 6) +lines(c(0.5, 0.5), c(1, 0), lty = 3, col = 6) +lines(c(0.5, 3.2), c(0, 0), col = 6) +curve(kweights(x, kernel = "Quadratic", normalize = TRUE), + from = 0, to = 3.2, col = 1, add = TRUE) + +text(0.5, 0.98, "Truncated", pos = 4) +text(0.8, kweights(0.8, "Bartlett", normalize = TRUE), "Bartlett", pos = 4) +text(1.35, kweights(1.4, "Quadratic", normalize = TRUE), "Quadratic Spectral", pos = 2) +text(1.15, 0.29, "Parzen", pos = 4) +arrows(1.17, 0.29, 1, kweights(1, "Parzen", normalize = TRUE), length = 0.1) +text(1.3, 0.2, "Tukey-Hanning", pos = 4) +arrows(1.32, 0.2, 1.1, kweights(1.1, "Tukey", normalize = TRUE), length = 0.1) + + +################################################### +### code chunk number 3: loadlibs1 +################################################### +library("sandwich") +library("lmtest") + + +################################################### +### code chunk number 4: hc-data +################################################### +data("PublicSchools") +ps <- na.omit(PublicSchools) +ps$Income <- ps$Income * 0.0001 + + +################################################### +### code chunk number 5: hc-model +################################################### +fm.ps <- lm(Expenditure ~ Income + I(Income^2), data = ps) + + +################################################### +### code chunk number 6: hc-test1 +################################################### +coeftest(fm.ps, df = Inf, vcov = vcovHC(fm.ps, type = "HC0")) + + +################################################### +### code chunk number 7: hc-test2 +################################################### +coeftest(fm.ps, df = Inf, vcov = vcovHC(fm.ps, type = "HC4")) + + +################################################### +### code chunk number 8: hc-plot +################################################### +plot(Expenditure ~ Income, data = ps, + xlab = "per capita income", + ylab = "per capita spending on public schools") +inc <- seq(0.5, 1.2, by = 0.001) +lines(inc, predict(fm.ps, data.frame(Income = inc)), col = 4, lty = 2) +fm.ps2 <- lm(Expenditure ~ Income, data = ps) +abline(fm.ps2, col = 4) +text(ps[2,2], ps[2,1], rownames(ps)[2], pos = 2) + + +################################################### +### code chunk number 9: hac-data +################################################### +data("Investment") + + +################################################### +### code chunk number 10: hac-model +################################################### +fm.inv <- lm(RealInv ~ RealGNP + RealInt, data = Investment) + + +################################################### +### code chunk number 11: hac-test1 +################################################### +coeftest(fm.inv, df = Inf, vcov = NeweyWest(fm.inv, lag = 4, prewhite = FALSE)) + + +################################################### +### code chunk number 12: hac-test2 +################################################### +coeftest(fm.inv, df = Inf, vcov = NeweyWest) + + +################################################### +### code chunk number 13: hac-test3 +################################################### +parzenHAC <- function(x, ...) kernHAC(x, kernel = "Parzen", prewhite = 2, + adjust = FALSE, bw = bwNeweyWest, ...) +coeftest(fm.inv, df = Inf, vcov = parzenHAC) + + +################################################### +### code chunk number 14: hac-plot +################################################### +library("scatterplot3d") +s3d <- scatterplot3d(Investment[,c(5,7,6)], + type = "b", angle = 65, scale.y = 1, pch = 16) +s3d$plane3d(fm.inv, lty.box = "solid", col = 4) + + +################################################### +### code chunk number 15: loadlibs2 +################################################### +library("strucchange") +data("RealInt") + + +################################################### +### code chunk number 16: sc-ocus +################################################### +ocus <- gefp(RealInt ~ 1, fit = lm, vcov = kernHAC) + + +################################################### +### code chunk number 17: sc-bp +################################################### +bp <- breakpoints(RealInt ~ 1) +confint(bp, vcov = kernHAC) + + +################################################### +### code chunk number 18: sc-plot +################################################### +par(mfrow = c(1, 2)) +plot(ocus, aggregate = FALSE, main = "") +plot(RealInt, ylab = "Real interest rate") +lines(ts(fitted(bp), start = start(RealInt), freq = 4), col = 4) +lines(confint(bp, vcov = kernHAC)) + + +################################################### +### code chunk number 19: sandwich.Rnw:786-787 +################################################### +options(prompt = " ") + + +################################################### +### code chunk number 20: sandwich.Rnw:805-807 (eval = FALSE) +################################################### +## library("sandwich") +## library("lmtest") +## library("strucchange") + + +################################################### +### code chunk number 21: sandwich.Rnw:814-815 (eval = FALSE) +################################################### +## data("PublicSchools") +## ps <- na.omit(PublicSchools) +## ps$Income <- ps$Income * 0.0001 + + +################################################### +### code chunk number 22: sandwich.Rnw:819-820 (eval = FALSE) +################################################### +## fm.ps <- lm(Expenditure ~ Income + I(Income^2), data = ps) + + +################################################### +### code chunk number 23: sandwich.Rnw:824-829 (eval = FALSE) +################################################### +## sqrt(diag(vcov(fm.ps))) +## sqrt(diag(vcovHC(fm.ps, type = "const"))) +## sqrt(diag(vcovHC(fm.ps, type = "HC0"))) +## sqrt(diag(vcovHC(fm.ps, type = "HC3"))) +## sqrt(diag(vcovHC(fm.ps, type = "HC4"))) + + +################################################### +### code chunk number 24: sandwich.Rnw:833-835 (eval = FALSE) +################################################### +## coeftest(fm.ps, df = Inf, vcov = vcovHC(fm.ps, type = "HC0")) +## coeftest(fm.ps, df = Inf, vcov = vcovHC(fm.ps, type = "HC4")) + + +################################################### +### code chunk number 25: sandwich.Rnw:855-856 (eval = FALSE) +################################################### +## data("Investment") + + +################################################### +### code chunk number 26: sandwich.Rnw:860-861 (eval = FALSE) +################################################### +## fm.inv <- lm(RealInv ~ RealGNP + RealInt, data = Investment) + + +################################################### +### code chunk number 27: sandwich.Rnw:879-881 (eval = FALSE) +################################################### +## plot(Investment[, "RealInv"], type = "b", pch = 19, ylab = "Real investment") +## lines(ts(fitted(fm.inv), start = 1964), col = 4) + + +################################################### +### code chunk number 28: sandwich.Rnw:897-898 (eval = FALSE) +################################################### +## data("RealInt") + + +################################################### +### code chunk number 29: sandwich.Rnw:902-905 (eval = FALSE) +################################################### +## ocus <- gefp(RealInt ~ 1, fit = lm, vcov = kernHAC) +## plot(ocus, aggregate = FALSE) +## sctest(ocus) + + +################################################### +### code chunk number 30: sandwich.Rnw:909-912 (eval = FALSE) +################################################### +## fs <- Fstats(RealInt ~ 1, vcov = kernHAC) +## plot(fs) +## sctest(fs) + + +################################################### +### code chunk number 31: sandwich.Rnw:917-919 (eval = FALSE) +################################################### +## bp <- breakpoints(RealInt ~ 1) +## confint(bp, vcov = kernHAC) +## plot(bp) + + +################################################### +### code chunk number 32: sandwich.Rnw:923-926 (eval = FALSE) +################################################### +## plot(RealInt, ylab = "Real interest rate") +## lines(ts(fitted(bp), start = start(RealInt), freq = 4), col = 4) +## lines(confint(bp, vcov = kernHAC)) + + diff -Nru sandwich-2.2-10/inst/doc/sandwich.Rnw sandwich-2.3-0/inst/doc/sandwich.Rnw --- sandwich-2.2-10/inst/doc/sandwich.Rnw 2013-03-29 10:58:20.000000000 +0000 +++ sandwich-2.3-0/inst/doc/sandwich.Rnw 2013-10-05 10:40:27.000000000 +0000 @@ -2,7 +2,7 @@ \usepackage{thumbpdf} %% need no \usepackage{Sweave} -\author{Achim Zeileis\\Wirtschaftsuniversit\"at Wien} +\author{Achim Zeileis\\Universit\"at Innsbruck} \Plainauthor{Achim Zeileis} \title{Econometric Computing with HC and HAC Covariance Matrix Estimators} @@ -40,12 +40,13 @@ \Address{ Achim Zeileis\\ - Department of Statistics and Mathematics\\ - WU Wirtschaftsuniversit\"at Wien\\ - Augasse 2--9\\ - 1090 Wien, Austria\\ + Department of Statistics\\ + Faculty of Economics and Statistics\\ + Universit\"at Innsbruck\\ + Universit\"atsstr.~15\\ + 6020 Innsbruck, Austria\\ E-mail: \email{Achim.Zeileis@R-project.org}\\ - URL: \url{http://statmath.wu.ac.at/~zeileis/} + URL: \url{http://eeecon.uibk.ac.at/~zeileis/} } \begin{document} Binary files /tmp/rn5oASZmG6/sandwich-2.2-10/inst/doc/sandwich.pdf and /tmp/viOUKD6EAC/sandwich-2.3-0/inst/doc/sandwich.pdf differ diff -Nru sandwich-2.2-10/man/bread.Rd sandwich-2.3-0/man/bread.Rd --- sandwich-2.2-10/man/bread.Rd 2013-03-29 10:32:04.000000000 +0000 +++ sandwich-2.3-0/man/bread.Rd 2013-09-23 08:58:34.000000000 +0000 @@ -34,7 +34,7 @@ \seealso{\code{\link{lm}}, \code{\link{glm}}} \references{ - Zeileis A (2006), Object-oriented Computation of Sandwich Estimators. + Zeileis A (2006), Object-Oriented Computation of Sandwich Estimators. \emph{Journal of Statistical Software}, \bold{16}(9), 1--16. URL \url{http://www.jstatsoft.org/v16/i09/}. } diff -Nru sandwich-2.2-10/man/isoacf.Rd sandwich-2.3-0/man/isoacf.Rd --- sandwich-2.2-10/man/isoacf.Rd 2010-03-31 14:15:28.000000000 +0000 +++ sandwich-2.3-0/man/isoacf.Rd 2013-09-23 08:58:34.000000000 +0000 @@ -30,7 +30,7 @@ } \references{ - Lumley A & Heagerty P (1999), + Lumley T & Heagerty P (1999), Weighted Empirical Adaptive Variance Estimators for Correlated Data Regression. \emph{Journal of the Royal Statistical Society B}, \bold{61}, 459--477. diff -Nru sandwich-2.2-10/man/meat.Rd sandwich-2.3-0/man/meat.Rd --- sandwich-2.2-10/man/meat.Rd 2010-03-31 14:15:28.000000000 +0000 +++ sandwich-2.3-0/man/meat.Rd 2013-09-23 08:58:34.000000000 +0000 @@ -28,7 +28,7 @@ \seealso{\code{\link{sandwich}}, \code{\link{bread}}, \code{\link{estfun}}} \references{ - Zeileis A (2006), Object-oriented Computation of Sandwich Estimators. + Zeileis A (2006), Object-Oriented Computation of Sandwich Estimators. \emph{Journal of Statistical Software}, \bold{16}(9), 1--16. URL \url{http://www.jstatsoft.org/v16/i09/}. } diff -Nru sandwich-2.2-10/man/sandwich.Rd sandwich-2.3-0/man/sandwich.Rd --- sandwich-2.2-10/man/sandwich.Rd 2010-03-31 14:15:28.000000000 +0000 +++ sandwich-2.3-0/man/sandwich.Rd 2013-09-23 08:58:34.000000000 +0000 @@ -35,7 +35,7 @@ \seealso{\code{\link{bread}}, \code{\link{meat}}, \code{\link{meatHC}}, \code{\link{meatHAC}}} \references{ - Zeileis A (2006), Object-oriented Computation of Sandwich Estimators. + Zeileis A (2006), Object-Oriented Computation of Sandwich Estimators. \emph{Journal of Statistical Software}, \bold{16}(9), 1--16. URL \url{http://www.jstatsoft.org/v16/i09/}. } diff -Nru sandwich-2.2-10/man/vcovHAC.Rd sandwich-2.3-0/man/vcovHAC.Rd --- sandwich-2.2-10/man/vcovHAC.Rd 2010-03-31 14:15:28.000000000 +0000 +++ sandwich-2.3-0/man/vcovHAC.Rd 2013-09-23 08:58:34.000000000 +0000 @@ -73,7 +73,7 @@ The covariance matrix estimators have been improved by the addition of a bias correction and an approximate denominator degrees of freedom for test and confidence interval -construction. +construction. See Lumley & Heagerty (1999) for details. } \value{A matrix containing the covariance matrix estimate. If \code{diagnostics} @@ -93,7 +93,7 @@ An Improved Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimator. \emph{Econometrica}, \bold{60}, 953--966. - Lumley A & Heagerty P (1999), + Lumley T & Heagerty P (1999), Weighted Empirical Adaptive Variance Estimators for Correlated Data Regression. \emph{Journal of the Royal Statistical Society B}, \bold{61}, 459--477. @@ -107,7 +107,7 @@ URL \url{http://www.jstatsoft.org/v11/i10/}. Zeileis A (2006), - Object-oriented Computation of Sandwich Estimators. + Object-Oriented Computation of Sandwich Estimators. \emph{Journal of Statistical Software}, \bold{16}(9), 1--16. URL \url{http://www.jstatsoft.org/v16/i09/}. } diff -Nru sandwich-2.2-10/man/vcovHC.Rd sandwich-2.3-0/man/vcovHC.Rd --- sandwich-2.2-10/man/vcovHC.Rd 2011-06-07 12:18:05.000000000 +0000 +++ sandwich-2.3-0/man/vcovHC.Rd 2013-09-23 08:58:34.000000000 +0000 @@ -37,6 +37,7 @@ \code{\link{sandwich}} and \code{\link{bread}}. See Zeileis (2006) for more implementation details. The theoretical background, exemplified for the linear regression model, is described below and in Zeileis (2004). + Analogous formulas are employed for other types of models. When \code{type = "const"} constant variances are assumed and and \code{vcovHC} gives the usual estimate of the covariance matrix of @@ -74,35 +75,35 @@ } \references{ -Cribari-Neto F. (2004), Asymptotic inference under heteroskedasticity -of unknown form. \emph{Computational Statistics \& Data Analysis} +Cribari-Neto F. (2004), Asymptotic Inference under Heteroskedasticity +of Unknown Form. \emph{Computational Statistics \& Data Analysis} \bold{45}, 215--233. -Cribari-Neto F., Da Silva W.B. (2011), A new heteroskedasticity-consistent -covariance matrix estimator for the linear regression model. +Cribari-Neto F., Da Silva W.B. (2011), A New Heteroskedasticity-Consistent +Covariance Matrix Estimator for the Linear Regression Model. \emph{Advances in Statistical Analysis}, \bold{95}(2), 129--146. Cribari-Neto F., Souza T.C., Vasconcellos, K.L.P. (2007), Inference under -heteroskedasticity and leveraged data. \emph{Communications in Statistics -- Theory and +Heteroskedasticity and Leveraged Data. \emph{Communications in Statistics -- Theory and Methods}, \bold{36}, 1877--1888. Errata: \bold{37}, 3329--3330, 2008. Long J. S., Ervin L. H. (2000), Using Heteroscedasticity Consistent Standard Errors in the Linear Regression Model. \emph{The American Statistician}, \bold{54}, 217--224. -MacKinnon J. G., White H. (1985), Some heteroskedasticity-consistent -covariance matrix estimators with improved finite sample properties. +MacKinnon J. G., White H. (1985), Some Heteroskedasticity-Consistent +Covariance Matrix Estimators with Improved Finite Sample Properties. \emph{Journal of Econometrics} \bold{29}, 305--325. -White H. (1980), A heteroskedasticity-consistent covariance matrix and -a direct test for heteroskedasticity. \emph{Econometrica} \bold{48}, +White H. (1980), A Heteroskedasticity-Consistent Covariance Matrix and +a Direct Test for Heteroskedasticity. \emph{Econometrica} \bold{48}, 817--838. Zeileis A (2004), Econometric Computing with HC and HAC Covariance Matrix Estimators. \emph{Journal of Statistical Software}, \bold{11}(10), 1--17. URL \url{http://www.jstatsoft.org/v11/i10/}. -Zeileis A (2006), Object-oriented Computation of Sandwich Estimators. +Zeileis A (2006), Object-Oriented Computation of Sandwich Estimators. \emph{Journal of Statistical Software}, \bold{16}(9), 1--16. URL \url{http://www.jstatsoft.org/v16/i09/}. } diff -Nru sandwich-2.2-10/man/vcovOPG.Rd sandwich-2.3-0/man/vcovOPG.Rd --- sandwich-2.2-10/man/vcovOPG.Rd 2010-03-31 14:15:28.000000000 +0000 +++ sandwich-2.3-0/man/vcovOPG.Rd 2013-09-23 08:58:34.000000000 +0000 @@ -42,7 +42,7 @@ Cameron AC and Trivedi PK (2005), \emph{Microeconometrics: Methods and Applications}. Cambridge University Press, Cambridge. - Zeileis A (2006), Object-oriented Computation of Sandwich Estimators. + Zeileis A (2006), Object-Oriented Computation of Sandwich Estimators. \emph{Journal of Statistical Software}, \bold{16}(9), 1--16. URL \url{http://http://www.jstatsoft.org/v16/i09/}. } diff -Nru sandwich-2.2-10/man/weightsLumley.Rd sandwich-2.3-0/man/weightsLumley.Rd --- sandwich-2.2-10/man/weightsLumley.Rd 2010-10-13 09:52:27.000000000 +0000 +++ sandwich-2.3-0/man/weightsLumley.Rd 2013-09-23 08:58:34.000000000 +0000 @@ -78,7 +78,7 @@ \references{ - Lumley A & Heagerty P (1999), + Lumley T & Heagerty P (1999), Weighted Empirical Adaptive Variance Estimators for Correlated Data Regression. \emph{Journal of the Royal Statistical Society B}, \bold{61}, 459--477. diff -Nru sandwich-2.2-10/tests/Examples/sandwich-Ex.Rout.save sandwich-2.3-0/tests/Examples/sandwich-Ex.Rout.save --- sandwich-2.2-10/tests/Examples/sandwich-Ex.Rout.save 2013-03-29 10:38:43.000000000 +0000 +++ sandwich-2.3-0/tests/Examples/sandwich-Ex.Rout.save 2013-10-05 10:39:41.000000000 +0000 @@ -1,7 +1,6 @@ -R version 2.15.2 (2012-10-26) -- "Trick or Treat" -Copyright (C) 2012 The R Foundation for Statistical Computing -ISBN 3-900051-07-0 +R version 3.0.1 (2013-05-16) -- "Good Sport" +Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -20,16 +19,8 @@ > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('sandwich') -Loading required package: zoo - -Attaching package: 'zoo' - -The following object(s) are masked from 'package:base': - - as.Date, as.Date.numeric - > -> assign(".oldSearch", search(), pos = 'CheckExEnv') +> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > cleanEx() > nameEx("Investment") > ### * Investment @@ -65,12 +56,12 @@ RealGNP 0.16914 0.02057 8.224 3.87e-07 *** RealInt -1.00144 2.36875 -0.423 0.678 --- -Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 +Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 17.21 on 16 degrees of freedom (1 observation deleted due to missingness) -Multiple R-squared: 0.8141, Adjusted R-squared: 0.7908 -F-statistic: 35.03 on 2 and 16 DF, p-value: 1.429e-06 +Multiple R-squared: 0.8141, Adjusted R-squared: 0.7908 +F-statistic: 35.03 on 2 and 16 DF, p-value: 1.429e-06 > > ## visualize residuals, p. 412, Figure 15.1 @@ -92,10 +83,18 @@ + bgtest(fm, order = 4) + } Loading required package: lmtest +Loading required package: zoo + +Attaching package: 'zoo' + +The following object is masked from 'package:base': + + as.Date, as.Date.numeric + Breusch-Godfrey test for serial correlation of order up to 4 -data: fm +data: fm LM test = 12.0697, df = 4, p-value = 0.01684 > @@ -116,7 +115,7 @@ > > cleanEx() -detaching 'package:scatterplot3d', 'package:lmtest' +detaching 'package:scatterplot3d', 'package:lmtest', 'package:zoo' > nameEx("NeweyWest") > ### * NeweyWest @@ -198,11 +197,11 @@ Income -1834.2 829.0 -2.213 0.03182 * I(Income^2) 1587.0 519.1 3.057 0.00368 ** --- -Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 +Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 56.68 on 47 degrees of freedom -Multiple R-squared: 0.6553, Adjusted R-squared: 0.6407 -F-statistic: 44.68 on 2 and 47 DF, p-value: 1.345e-11 +Multiple R-squared: 0.6553, Adjusted R-squared: 0.6407 +F-statistic: 44.68 on 2 and 47 DF, p-value: 1.345e-11 > > ## compare standard and HC0 standard errors @@ -247,6 +246,14 @@ + coeftest(fmq1, df = Inf, vcov = vcovHC(fmq1, type = "HC4"))[3,4] + } Loading required package: lmtest +Loading required package: zoo + +Attaching package: 'zoo' + +The following object is masked from 'package:base': + + as.Date, as.Date.numeric + [1] 0.8923303 > > ## visualization, p. 230, Figure 1 @@ -263,7 +270,7 @@ > > cleanEx() -detaching 'package:lmtest' +detaching 'package:lmtest', 'package:zoo' > nameEx("bread") > ### * bread @@ -659,7 +666,7 @@ RealInt 49.7891281 -0.0664134303 17.71735491 > kernHAC(fm, verbose = TRUE) -Bandwidth chosen: 1.74474889764603 +Bandwidth chosen: 1.74474889764602 (Intercept) RealGNP RealInt (Intercept) 788.6120652 -0.7502080996 49.78912814 RealGNP -0.7502081 0.0007483977 -0.06641343 @@ -670,7 +677,7 @@ > kernHAC(fm, kernel = "Parzen", prewhite = 2, adjust = FALSE, + bw = bwNeweyWest, verbose = TRUE) -Bandwidth chosen: 2.8144444946606 +Bandwidth chosen: 2.8144444946607 (Intercept) RealGNP RealInt (Intercept) 608.3101258 -0.5089107386 -64.93690203 RealGNP -0.5089107 0.0004340803 0.04689293 @@ -714,8 +721,9 @@ > > ### *