getdata.DN {DynNom}R Documentation

Extract dataset from a model object

Description

getdata.DN extracts dataset that was used to produce the model object (supported in DynNom).

Usage

getdata.DN(model)

Arguments

model

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

Value

A data.frame containing the dataset used in the fitted model object.

See Also

DynNom, DNbuilder

Examples

fit1 <- glm(Survived ~ Age + Class + Sex, data = as.data.frame(Titanic),
  weights = Freq, family = binomial("probit"))
getdata.DN(fit1)

library(survival)
fit2 <- coxph(Surv(time, status) ~ age + strata(sex) + ph.ecog, data = lung)
getdata.DN(fit2)

[Package DynNom version 5.1 Index]