Skip to contents

Source: the partial-F used by Stock, Wright and Yogo (2002), Journal of Business and Economic Statistics 20, 518-529. With RSS_u the residual sum of squares of the first-stage regression D ~ X_exog + Z and RSS_r that of the restricted fit on X_exog alone, F = ((RSS_r - RSS_u)/L) / (RSS_u/(n - k - L)) on (L, n - k - L) degrees of freedom. The Stock-Yogo threshold of 10 is reported as weak, but it is a rule of thumb, not a size-correct critical value.

Usage

Ivfstage(D, Z, X_exog = NULL, add_intercept = TRUE)

Arguments

D

Numeric endogenous regressor of length n.

Z

Numeric n x L matrix of excluded instruments.

X_exog

Optional n x q matrix of included exogenous covariates.

add_intercept

Include an intercept. Default TRUE.

Value

list: statistic, p_value, df1, df2, rss_u, rss_r, n, n_instruments, weak, method.

Examples

set.seed(1)
Z <- matrix(rnorm(120), 60, 2)
Ivfstage(Z %*% c(1, 0.5) + rnorm(60), Z)$statistic
#> [1] 24.1967