ff_metrics | R Documentation |
Generate common metrics for regression model results
ff_metrics(.data)
## S3 method for class 'lm'
ff_metrics(.data)
## S3 method for class 'lmlist'
ff_metrics(.data)
## S3 method for class 'glm'
ff_metrics(.data)
## S3 method for class 'glmlist'
ff_metrics(.data)
## S3 method for class 'lmerMod'
ff_metrics(.data)
## S3 method for class 'glmerMod'
ff_metrics(.data)
## S3 method for class 'coxph'
ff_metrics(.data)
## S3 method for class 'coxphlist'
ff_metrics(.data)
.data |
Model output. |
Model metrics vector for output.
library(finalfit)
# glm
fit = glm(mort_5yr ~ age.factor + sex.factor + obstruct.factor + perfor.factor,
data=colon_s, family="binomial")
fit %>%
ff_metrics()
# glmlist
explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = "mort_5yr"
colon_s %>%
glmmulti(dependent, explanatory) %>%
ff_metrics()
# glmerMod
explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor")
random_effect = "hospital"
dependent = "mort_5yr"
colon_s %>%
glmmixed(dependent, explanatory, random_effect) %>%
ff_metrics()
# lm
fit = lm(nodes ~ age.factor + sex.factor + obstruct.factor + perfor.factor,
data=colon_s)
fit %>%
ff_metrics()
# lmerMod
explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor")
random_effect = "hospital"
dependent = "nodes"
colon_s %>%
lmmixed(dependent, explanatory, random_effect) %>%
ff_metrics()
# coxphlist
explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = "Surv(time, status)"
colon_s %>%
coxphmulti(dependent, explanatory) %>%
ff_metrics()
# coxph
fit = survival::coxph(survival::Surv(time, status) ~ age.factor + sex.factor +
obstruct.factor + perfor.factor,
data = colon_s)
fit %>%
ff_metrics()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.