stock_yogo_test: Perform the Stock and Yogo test for weak instruments

Description Usage Arguments Value Examples

View source: R/stock_and_yogo.R

Description

Perform the Stock and Yogo test for weak instruments

Usage

1
stock_yogo_test(X, D, Z, data, B = 0.05, size_bias = "bias")

Arguments

X

(formula). A one-sided formula of control variables.

D

(formula). A one-sided formula of endogenous variables (treatments)

Z

(formula). A one-sided formula of instruments

data

(dataframe). An optional dataframe, list, or environment containing the variables used in the model. As with many of the base R functions, if the variables are not found here, they may be searched for in the environment cragg_donald() was called.

B

One of [.05, .1, .15, .2, .25, .3]. The maximum size of allowable bias relative

size_bias

Either "bias" or "size". Whether to use a critical value based on the maximum allowable bias relative to regular OLS (bias), or maximum Wald test size distortion (size).

Value

(sy_test) the results of the stock and yogo test.

Examples

1
2
3
4
5
6
7
#Perform the Stock and Yogo test on a model that instruments
#Sepal Width on Petal Length, Petal Width, and Species, while controlling
#for Sepal.Length (a toy example).

stock_yogo_test(X=~Sepal.Length, D=~Sepal.Width,
	Z=~Petal.Length + Petal.Width + Species,
	size_bias="bias",data = iris)

cragg documentation built on Jan. 13, 2021, 6:16 p.m.