getpred.DN: Extract predictions from a Model Object

View source: R/getpred-DN.R

getpred.DNR 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, 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

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 Sept. 9, 2022, 5:06 p.m.

Related to getpred.DN in DynNom...