ui.ols: Uncertainty intervals for OLS regression

Description Usage Arguments Details Value Author(s) References Examples

View source: R/ui.ols.R

Description

This function allows you to derive uncertainty intervals for OLS regression when there is missing data in the continuous outcome. The uncertainty intervals can be used as a sensitivity analysis to ignorability (missing at random). Note that rho=0 render the same results as a complete case analysis.

Usage

1
2
ui.ols(out.formula, mis.formula = NULL, data, rho = c(-0.3, 0.3),
  alpha = 0.05, gridn = 101)

Arguments

out.formula

Formula for outcome regression.

mis.formula

Formula for missingness mechanism. If NULL the same covariates as in the outcome regression will be used.

data

data.frame containing the variables in the formula.

rho

The limits of rho for which the uncertainty interval should be constructed.

alpha

Default 0.05 corresponding to a confidence level of 95 for CI and UI.

gridn

The number of distinct points within the interval rho at which confidence intervals should be constructed. Default is 101.

Details

In order to visualize the results, you can use plot.uiols, or profile.uiols.

Value

A list containing:

call

The matched call

ci

Confidence intervals for different values of rho

ui

Uncertainty intervals

coef

Estimated coefficients (outcome regression) for different values of rho

out.model

Outcome regression model when rho=0.

mis.model

Regression model for missingness mechanism (selection).

rho

The range of rho for which we want to construct an uncertainty interval

gridrho

The values of rho for which bias and standard errors are derived

sigma

Consistant estimate of sigma

se

Standard error for different values of rho

ciols

Confidence intervals from a complete case analysis

ident.bound

Bounds for the coefficient estimates.

Author(s)

Minna Genbäck

References

Genbäck, M., Stanghellini, E., de Luna, X. (2015). Uncertainty Intervals for Regression Parameters with Non-ignorable Missingness in the Outcome. Statistical Papers, 56(3), 829-847.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(MASS)
n<-500
delta<-c(0.5,0.3,0.1)
beta<-c(0.8,-0.2,0.3)
X<-cbind(rep(1,n),rnorm(n),rbinom(n,1,0.5))
x<-X[,-1]
rho=0.4
error<-mvrnorm(n,c(0,0),matrix(c(1,rho*2,rho*2,4),2))
zstar<-X%*%delta+error[,1]
z<-as.numeric(zstar>0)
y<-X%*%beta+error[,2]
y[z==0]<-NA
data<-data.frame(y,x,z)
ui<-ui.ols(y~X1+X2,data=data,rho=c(-0.5,0.5))
ui
plot(ui)

ui documentation built on Nov. 11, 2019, 5:07 p.m.

Related to ui.ols in ui...