ui.probit: Uncertainty intervals for probit regression

Description Usage Arguments Details Value Author(s) References Examples

View source: R/ui.probit.R

Description

This function allows you to derive uncertainty intervals for probit regression when there is missing data in the binary outcome. The uncertainty intervals can be used as a sensitivity analysis to ignorability (missing at random), and are derived by maximum likelihood. Note that rho=0 render the same results as a complete case analysis.

Usage

1
2
ui.probit(out.formula, mis.formula = NULL, data, rho = c(-0.3, 0.3),
  progress = TRUE, max.grid = 0.1, alpha = 0.05, method = "NR")

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

Vector containing the values of rho for which we want to fit the likelihood.

progress

If TRUE prints out process time for each maximization of the likelihood.

max.grid

Maximum distance between two elements in rho, if two wide there can difficulties with convergence of the maximum likelihood.

alpha

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

method

Maximization method to be passed through maxLik

Details

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

Value

A list containing:

coef

Estimated coefficients (outcome regression) for different values of rho.

rho

The values of rho for which the likelihood is maximized.

vcov

Covariance matrix.

ci

Confidence intervals for different values of rho.

ui

Uncertainty intervals.

out.model

Outcome regression model when rho=0.

mis.model

Regression model for missingness mechanism (selection).

se

Standard errors from outcome regression.

value

Value of maximum likelihood for different values of rho.

y

Outcome vector.

z

Indicator variable of observed outcome.

X.y

Covariate matrix for outcome regression.

X.z

Covariate matrix for missingness mechanism (selection regression model).

max.info

Information about the maximization procedure. Includes whether it converged, message, method and number of iterations.

Author(s)

Minna Genbäck

References

Genbäck, M., Ng, N., Stanghellini, E., de Luna, X. (2018). Predictors of Decline in Self-reported Health: Addressing Non-ignorable Dropout in Longitudinal Studies of Aging. European journal of ageing, 15(2), 211-220.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(MASS)
n<-500

delta<-c(0.5,0.6,0.1,-1,1)
beta<-c(-0.3,-0.5,0,-0.4,-0.3)

X<-cbind(rep(1,n),rnorm(n),runif(n),rbinom(n,2,0.5),rbinom(n,1,0.5))
x<-X[,-1]
rho=0.4
error<-mvrnorm(n,c(0,0),matrix(c(1,rho,rho,1),2))

zstar<-X%*%delta+error[,1]
z<-as.numeric(zstar>0)

ystar<-X%*%beta+error[,2]
y<-as.integer(ystar>0)
y[z==0]<-NA
data=data.frame(y=y,x1=x[,1],x2=x[,2],x3=x[,3],x4=x[,4])

m<-ui.probit(y~x1+x2+x3+x4,data=data,rho=c(0,0.5))
m
plot(m)
profile(m)

Example output

Optimization for rho = 0.1 
   Time elapsed: 0.709 s 
Optimization for rho = 0.2 
   Time elapsed: 0.734 s 
Optimization for rho = 0.3 
   Time elapsed: 0.695 s 
Optimization for rho = 0.4 
   Time elapsed: 0.783 s 
Optimization for rho = 0.5 
   Time elapsed: 0.7 s 

Call:
ui.probit(out.formula = y ~ x1 + x2 + x3 + x4, data = data, rho = c(0,     0.5))


Confidence intervals (CI) derived assuming ignorable dropout (rho=0)
Uncertainty intervals (UI) derived assuming 0<=rho<=0.5

               Est               ci               ui
(Intercept) -0.033  (-0.474, 0.408)   (-0.75, 0.408)
x1          -0.493 (-0.708, -0.278) (-0.708, -0.106)
x2          -0.165  (-0.772, 0.443)  (-0.772, 0.459)
x3          -0.243  (-0.539, 0.052)  (-0.716, 0.052)
x4          -0.502  (-0.88, -0.124)   (-0.88, 0.105)

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

Related to ui.probit in ui...