cluster.wild.plm: Wild Cluster Bootstrapped p-Values For PLM

Description Usage Arguments Value Author(s) References Examples

View source: R/clusterwild.plm.R

Description

This software estimates p-values using wild cluster bootstrapped t-statistics for fixed effects panel linear models (Cameron, Gelbach, and Miller 2008). Residuals are repeatedly re-sampled by cluster to form a pseudo-dependent variable, a model is estimated for each re-sampled data set, and inference is based on the sampling distribution of the pivotal (t) statistic. The null is never imposed for PLM models.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cluster.wild.plm(
  mod,
  dat,
  cluster,
  ci.level = 0.95,
  boot.reps = 1000,
  report = TRUE,
  prog.bar = TRUE,
  output.replicates = FALSE,
  seed = NULL
)

Arguments

mod

A "within" model estimated using plm.

dat

The data set used to estimate mod.

cluster

Clustering dimension ("group", the default, or "time").

ci.level

What confidence level should CIs reflect? (Note: only reported when impose.null == FALSE).

boot.reps

The number of bootstrap samples to draw.

report

Should a table of results be printed to the console?

prog.bar

Show a progress bar of the bootstrap (= TRUE) or not (= FALSE).

output.replicates

Should the cluster bootstrap coefficient replicates be output (= TRUE) or not (= FALSE)?

seed

Random number seed for replicability (default is NULL).

Value

A list with the elements

p.values

A matrix of the estimated p-values.

ci

A matrix of confidence intervals (if null not imposed).

Author(s)

Justin Esarey

References

Esarey, Justin, and Andrew Menger. 2017. "Practical and Effective Approaches to Dealing with Clustered Data." Political Science Research and Methods forthcoming: 1-35. <URL:http://jee3.web.rice.edu/cluster-paper.pdf>.

Cameron, A. Colin, Jonah B. Gelbach, and Douglas L. Miller. 2008. "Bootstrap-Based Improvements for Inference with Clustered Errors." The Review of Economics and Statistics 90(3): 414-427. <DOI:10.1162/rest.90.3.414>.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 

# predict employment levels, cluster on group
require(plm)
data(EmplUK)

emp.1 <- plm(emp ~ wage + log(capital+1), data = EmplUK, model = "within",
             index=c("firm", "year"))
cluster.wild.plm(mod=emp.1, dat=EmplUK, cluster="group", ci.level = 0.95,
        boot.reps = 1000, report = TRUE, prog.bar = TRUE)

# cluster on time
cluster.wild.plm(mod=emp.1, dat=EmplUK, cluster="time", ci.level = 0.95, 
            boot.reps = 1000, report = TRUE, prog.bar = TRUE)


## End(Not run)

clusterSEs documentation built on April 6, 2021, 1:06 a.m.