Learn R Programming

DynNom (version 5.0.2)

getdata.DN: 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)

Value

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

Arguments

model

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

See Also

DynNom, DNbuilder

Examples

Run this code
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)

Run the code above in your browser using DataLab