predict.augSIMEX {augSIMEX}R Documentation

Predict Method for the model fits by augSIMEX

Description

This function returns the predictions and optionally estimates the standard errors of the predictions from a fitted augSIMEX object.

Usage

## S3 method for class 'augSIMEX'

## S3 method for class 'augSIMEX'
predict(object, newdata = NULL, type = c("link", "response","terms"), 
se.fit = FALSE, dispersion = NULL, terms = NULL, na.action = na.pass, ...) 

Arguments

object

the “augSIMEX" object gotten from augSIMEX function.

newdata

An optional data frame in which to look for variables with which to predict. If not specified, the prediction will be conducted on the original main data.

type

the type of prediction needed. The default is on the scale of the linear predictors; the alternative "response" is on the scale of the response variable. The setting is similar to the predict.glm. The "terms" option returns a matrix including the fitted values of each term in the model formula on the linear predictor scale.

se.fit

a logical variable indicating if standard errors are required.

dispersion

a numeric variable specifying the dispersion of the fit to be assumed when computing the standard errors.

terms

a character vector specifies which terms are to be returned. This is the case for type = "terms".

na.action

function determining what should be done with missing values in newdata. The default is to predict NA.

...

other arguments that are passed into the function.

Details

The specifications of the arugments are the same as the setting in glm function. The user may refer to the predict.glm.

Author(s)

Qihuang Zhang and Grace Y. Yi.

See Also

predict,predict.glm

Examples

data(ToyUni)
example <- augSIMEX(mainformula = Y ~ Xstar + Zstar + W, family = binomial(link = logit),
  mismodel = pi|qi ~ W, 
  meformula = Xstar ~ X + Z + W,
  data = ToyUni$Main,validationdata = ToyUni$Validation, subset = NULL,
  err.var = "Xstar", mis.var = "Zstar", err.true = "X", mis.true = "Z", 
  err.mat = NULL,
  lambda = NULL, M = 5, B = 2, nBoot = 2, extrapolation="quadratic")
predict(example)

[Package augSIMEX version 3.7.4 Index]