icdglm.fit {icdGLM}R Documentation

EM by the Method of Weights for Incomplete Data in GLMs (Algorithm)

Description

This function applies the EM algorithm by the method of weights to incomplete data in a general linearized model.

Usage

icdglm.fit(x, y, weights = rep.int(1, NROW(x)), indicator = rep.int(0, NROW(x)),
       family = binomial(link = "logit"), control=list())

Arguments

x

a vector, matrix, list or data frame containing the independent variables

y

a vector of integers or numerics. This is the dependent variable.

weights

a vector which attaches a weight to each observation. For incomplete data, this is obtained from expand_data.

indicator

a vector that indicates which observations belong to each other. This is obtained from expand_data.

family

family for glm.fit. See glm or family for more details. Default is binomial(link = "logit").

control

a list of control characteristics. See glm.control for further information. Default settings are: epsilon = 1e-10, maxit = 100, trace = FALSE.

Value

icdglm.fit returns a list with the following elements:

References

Ibrahim, Joseph G. (1990). Incomplete Data in Generalized Linear Models. Journal of the American Statistical Association, Vol.85, No. 411, pp. 765 - 769.

See Also

expand_data, icdglm glm.fit, glm.control, summary.glm

Examples

data(TLI.data)
          complete.data <- expand_data(data = TLI.data[, 1:3],
                                       y = TLI.data[, 4],
                                       missing.x = 1:3,
                                       value.set = 0:1)
          example1 <- icdglm.fit(x = complete.data$data[, 1:3],
                                 y = complete.data$data[, 4],
                                 weights = complete.data$weights,
                                 indicator = complete.data$indicator,
                                 family = binomial(link = "logit"),
                                 control = list(epsilon = 1e-10,
                                                maxit = 100, trace = TRUE))

[Package icdGLM version 1.0.0 Index]