Learn R Programming

clusterSEs (version 2.2)

cluster.im.ivreg: Cluster-Adjusted Confidence Intervals And p-Values For GLM

Description

Computes p-values and confidence intervals for GLM models based on cluster-specific model estimation (Ibragimov and Muller 2010). A separate model is estimated in each cluster, and then p-values and confidence intervals are computed based on a t/normal distribution of the cluster-specific estimates.

Usage

cluster.im.ivreg(mod, dat, cluster, ci.level = 0.95, report = TRUE,
  drop = FALSE)

Arguments

mod
A model estimated using ivreg.
dat
The data set used to estimate mod.
cluster
A formula of the clustering variable.
ci.level
What confidence level should CIs reflect?
report
Should a table of results be printed to the console?
drop
Should clusters within which a model cannot be estimated be dropped?

Value

  • A list with the elements
  • p.valuesA matrix of the estimated p-values.
  • ciA matrix of confidence intervals.

References

Ibragimov, Rustam, and Ulrich K. Muller. 2010. "t-Statistic Based Correlation and Heterogeneity Robust Inference." Journal of Business & Economic Statistics 28(4): 453-468.

Examples

Run this code
# example: pooled IV analysis of employment
require(plm)
require(AER)
data(EmplUK)
EmplUK$lag.wage <- lag(EmplUK$wage)
emp.iv <- ivreg(emp ~ wage + log(capital+1) | output + lag.wage + log(capital+1), data = EmplUK)

# compute cluster-adjusted p-values
cluster.im.e <- cluster.im.ivreg(mod=emp.iv, dat=EmplUK, cluster = ~firm)

Run the code above in your browser using DataLab