ui.ols {ui} | R Documentation |
Uncertainty intervals for OLS regression
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
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 |
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 |
ui |
Uncertainty intervals |
coef |
Estimated coefficients (outcome regression) for different values of |
out.model |
Outcome regression model when rho=0. |
mis.model |
Regression model for missingness mechanism (selection). |
rho |
The range of |
gridrho |
The values of |
sigma |
Consistant estimate of sigma |
se |
Standard error for different values of |
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
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)