getpred.DN {DynNom}R Documentation

Extract predictions from a Model Object

Description

getpred.DN extracts class, family and inverse of link function from a model object (supported in DynNom).

Usage

getpred.DN(model, newd, set.rms=F)

Arguments

model

an lm, glm, coxph, ols, Glm, lrm, cph or mgcv::gam model objects.

newd

a data frame of predictors for prediction

set.rms

a logical value indicating if data should be updated in the model object (required for rms model objects in DNbuilder).

Value

A list including the prediction (pred) and the standard error of prediction (SEpred).

See Also

DynNom, DNbuilder

Examples

fit1 <- glm(Survived ~ Age + Class + Sex, data = as.data.frame(Titanic),
  weights = Freq, family = binomial("probit"))
getpred.DN(fit1, newd = data.frame(Class="1st", Sex="Male", Age="Child"))

[Package DynNom version 5.1 Index]