Learn R Programming

autoReg (version 0.3.3)

fit2stats: Summarize statistics with a model

Description

Summarize statistics with a model

Usage

fit2stats(fit, method = "default", digits = 2, mode = 1)

Value

An object of class "data.frame"

Arguments

fit

An object of class lm or glm or coxph or survreg

method

character choices are one of the c("likelihood","wald")

digits

integer indicating the number of decimal places

mode

integer

Examples

Run this code
library(survival)
data(cancer)
fit=glm(status~rx+sex+age+obstruct+nodes,data=colon,family="binomial")
fit2stats(fit)
fit=lm(mpg~wt*hp+am,data=mtcars)
fit2stats(fit)
fit=survreg(Surv(time,status)~rx+sex+age+obstruct+nodes,data=colon)
fit2stats(fit)

Run the code above in your browser using DataLab