Description Usage Arguments Details Value Author(s) References Examples
Given an interval B = [b_L, b_U], tests against the null hypothesis that
the identification region for the specified coefficient is a superset of
B (type = "subset"
, the default) or equals B (type
= "equal"
).
1 | interval_hypothesis(fit, term, interval, type = c("subset", "equal"))
|
fit |
Fitted model of class |
term |
Name of the coefficient whose identification region is being tested. |
interval |
Interval specified in the null hypothesis. May be a
singleton; e.g., |
type |
Whether the null hypothesis should be that |
The test with type = "subset"
corresponds to
confint.coefbounds
with type = "DU"
. The test with
type = "equal"
corresponds to confint.coefbounds
with
type = "CC"
.
Implements largely the same functionality as CI1D
in Beresteanu et
al.'s (2010) Stata program.
A list of class "interval_hypothesis"
containing:
test_stat
Test statistic.
p
Bootstrap p-value.
n_boot
Number of bootstrap iterations.
clus
Whether a cluster bootstrap was used.
term
Name of coefficient tested.
interval
Interval specified.
estimate
Sample estimate of coefficient bounds.
type
Type of test performed.
Brenton Kenkel
Arie Beresteanu, Francesca Molinari and Darcy Steeg Morris. 2010. "Asymptotics for Partially Identified Models in Stata." https://molinari.economics.cornell.edu/programs.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Simulate data
set.seed(18)
x1 <- rnorm(50)
x2 <- rnorm(50)
y <- 1 - x1 + x2 + rnorm(50)
yl <- floor(y)
yu <- ceiling(y)
## Fit model
fit <- coefbounds(yl + yu ~ x1 + x2, boot = 100)
## Test hypothesis that the identification region for the coefficient on x1
## contains -0.25
interval_hypothesis(fit,
term = "x1",
interval = c(-0.25, -0.25),
type = "subset")
## Test hypothesis that the identification region for the coefficient on x2
## equals [0, 1.5]
interval_hypothesis(fit,
term = "x2",
interval = c(0, 1.5),
type = "equal")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.