fil: fil

Description Usage Arguments Value References Examples

View source: R/fil.R

Description

This provides the estimates using IL method and FIL method as described in the reference.

Usage

1
2
fil(formula, data, parameter = NULL, family = binomial, alpha = 0.05,
interaction = FALSE, k = NULL, na.action)

Arguments

formula

as in lm. The missing values of response are NA.

data

as in lm. The first column of data is binary missing response. The missing observations are denoted by NA. The rest of the columns are covariates or explanatory variables.

parameter

The starting values of the parameters as (β, α) where β is the parameters of original model and α is the for the missing data model.

family

as in glm. brlrmr currently supports only the "binomial" family with links.

alpha

This is used for upper 100(1 - alpha)% point of standard Normal distribution. The default is 1.96.

interaction

TRUE or FALSE, whether to consider interaction in the missing data model. Currenly only one intercation between response and covariates is supported. FALSE by default.

k

Which covariate has interaction with response. Takes integer values. User must assign a value if interaction = TRUE.

na.action

as in lm. Always set to na.pass. Note that setting any other value to na.action will remove the NA's from response and hence will break the code as this package is only intended for missing response data.

Value

n

number of observations.

nmissing

the number of missing observations.

missing.proportion

proportion of missing observations.

beta.hat

parameter estimate of logistic regression of y on x using FIL method.

beta.se.hat

standard error using FIL method.

z.value

Wald Z value using FIL method.

p.value

p value using FIL method.

significance.beta.firth

indicator output whether regressors are significant using FIL method, 1 if significant and 0 if not significant.

LCL

Lower Confidence Limits of 100(1 - alpha)% Confidence Intervals.

UCL

Upper Confidence Limits of 100(1 - alpha)% Confidence Intervals.

alpha.hat

parameter estimate due to missing model using FIL.

alpha.se.hat

standard error of the them.

z.value.alpha

Wald Z value for them.

p.value.alpha

p values for them.

References

Bias Reduction in Logistic Regression with Missing Responses when the Missing Data Mechanism is Nonignorable.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## Not run: 
#############################################
########### Simulated Example ###############
#############################################
data(simulated.data)  # load simulated data

# parameter definition
beta0 <- 1
beta1 <- 1
beta2 <- 1
beta3 <- 1
beta4 <- 1

# parameter definition for missing indicator
alpha0 <- -1.1
alpha1 <- -1
alpha2 <- 1
alpha3 <- 1
alpha4 <- 1
alpha5 <- -1

parameter <- c(beta0, beta1, beta2, beta3, beta4,
               alpha0, alpha1, alpha2, alpha3, alpha4, alpha5)

fil(y ~ x1 + x2 + x3 + x4, data = simulated.data, parameter,
family = binomial(link = "logit"), na.action = na.pass)

## End(Not run)

#############################################
##### Real data example with separation #####
#############################################
data(nhanes)  # load nhanes data
fil(hyp ~ age2 + age3, data = nhanes, family = binomial(link = "logit"), na.action = na.pass)

data(incontinence)  # load nhanes data
fil(y ~ x1 + x2 + x3, data = incontinence, family = binomial(link = "logit"), na.action = na.pass)

brlrmr documentation built on Sept. 11, 2019, 1:04 a.m.

Related to fil in brlrmr...