tidy.survival_ln_mixture_em: Tidying method for a Lognormal Mixture model (fitted via...

View source: R/tidiers.R

tidy.survival_ln_mixture_emR Documentation

Tidying method for a Lognormal Mixture model (fitted via Expectation-Maximization algorithm).

Description

These method tidy the estimates from survival_ln_mixture fits into a short summary. It doesn't contain uncertainty estimates since it's a likelihood maximization algorithm.

Usage

## S3 method for class 'survival_ln_mixture_em'
tidy(x, effects = "fixed", digits = NULL, ...)

Arguments

x

Fitted model object (survival_ln_mixture_em).

effects

A character vector including one or more of "fixed" and ⁠"auxiliary⁠.

digits

How many significant digits should be displayed?

...

Not used.

Value

A data.frame without rownames. When effects="fixed" (the default), tidy.survival_ln_mixutre returns one row for each coefficient for each component of the mixture with two columns:

term

The name of the corresponding term in the model.

estimate

A point estimate of the coefficient (last iteration value).

Setting effects="auxiliary" will select the precision and proportion of mixture components parameters.

Examples


require(survival)
lung$sex <- factor(lung$sex)
set.seed(1)
mod2 <- survival_ln_mixture_em(Surv(time, status == 2) ~ sex, lung)
tidy(mod2)
tidy(mod2, effects = c("fixed", "auxiliary"))


lnmixsurv documentation built on Sept. 11, 2024, 7:18 p.m.