plot.cmfactorfit: Plot cmfactorfit objects

Description Usage Arguments Value Examples

View source: R/plot_cmfactorfit.R

Description

Plot cmfactorfit objects

Usage

1
2
## S3 method for class 'cmfactorfit'
plot(x, fit = "both", colors = NULL, legend = TRUE, ...)

Arguments

x

a cmfactorfit object

fit

a character (either "null", "alt", or "both") that dictates what fits will be plotted

colors

vector of colors (one component for each individual fit being plotted) for the hazard estimates

legend

boolean parameter dictating whether or not a legend will be added to the plot

...

additional parameters to pass to the plot.cmfit function. Perhaps most usefully: lowering the default nreps (e.g. to 1000) makes plotting much faster.

Value

a plot comparing the hazard estimates from the null model with the individual estimates from each factor level

Examples

1
2
3
4
5
6
7
# fit factorial model
data(seasonalsex)
seasonalsex.factorfit <- factorfit_cyclomort(event ~ sex, data = seasonalsex, n.seasons = 1)

# summary
summary(seasonalsex.factorfit, coefs = TRUE)
plot(seasonalsex.factorfit)

cyclomort documentation built on Aug. 20, 2020, 5:06 p.m.