getpred.DN: Extract predictions from a Model Object

Description Usage Arguments Value See Also Examples

Description

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

Usage

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

Arguments

model

an lm, glm, coxph, ols, Glm, lrm, cph, mgcv::gam or gam::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

1
2
3
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"))

DynNom documentation built on June 20, 2019, 5:02 p.m.

Related to getpred.DN in DynNom...