IVpower: Power calculation for IV models

View source: R/ivpower.r

IVpowerR Documentation

Power calculation for IV models

Description

IVpower computes the power for one of the following tests: two stage least square estimates; Anderson-Rubin (1949) test; Sensitivity analysis.

Usage

IVpower(ivmodel, n = NULL, alpha = 0.05, beta = NULL, type = "TSLS", 
        deltarange = NULL, delta = NULL)

Arguments

ivmodel

ivmodel object.

n

number of sample size, if missing, will use the sample size from the input ivmodel object.

alpha

The significance level for hypothesis testing. Default is 0.05.

beta

True causal effect minus null hypothesis causal effect. If missing, will use the beta calculated from the input ivmodel object.

type

Determines which test will be used for power calculation. "TSLS" for two stage least square estimates; "AR" for Anderson-Rubin test; "ARsens" for sensitivity analysis.

deltarange

Range of sensitivity allowance. A numeric vector of length 2. If missing, will use the deltarange from the input ivmodel object.

delta

True value of sensitivity parameter when calculating the power. Usually take delta = 0 for the favorable situation or delta = NULL for unknown delta.

Details

IVpower computes the power for one of the following tests: two stage least square estimates; Anderson-Rubin (1949) test; Sensitivity analysis. The related value of parameters will be inferred from the input of ivmodel object.

Value

a power value for the specified type of test.

Author(s)

Yang Jiang, Hyunseung Kang, Dylan Small

References

Freeman G, Cowling BJ, Schooling CM (2013). Power and Sample Size Calculations for Mendelian Randomization Studies Using One Genetic Instrument. International journal of epidemiology, 42(4), 1157-1163.
Anderson, T.W. and Rubin, H. (1949). Estimation of the parameters of a single equation in a complete system of stochastic equations. Annals of Mathematical Statistics, 20, 46-63.
ang, X., Jiang, Y., Small, D. and Zhang, N (2017), Sensitivity analysis and power for instrumental variable studies, (under review of Biometrics).

See Also

See also ivmodel for details on the instrumental variables model. See also TSLS.power, AR.power, ARsens.power for details on the power calculation.

Examples

data(card.data)
Y=card.data[,"lwage"]
D=card.data[,"educ"]
Z=card.data[,"nearc4"]
Xname=c("exper", "expersq", "black", "south", "smsa", "reg661", 
        "reg662", "reg663", "reg664", "reg665", "reg666", "reg667", 
		"reg668", "smsa66")
X=card.data[,Xname]
card.model = ivmodel(Y=Y,D=D,Z=Z,X=X)

IVpower(card.model)
IVpower(card.model, n=10^4, type="AR")


ivmodel documentation built on April 9, 2023, 5:08 p.m.