plot_hazard {mixPHM}R Documentation

Plot functions

Description

Plotting functions for hazard rates, survival times and cluster profiles.

Usage

plot_hazard(x, gr.subset, var.subset, group = TRUE, xlim = NA, ylim = NA, 
xlab = "Survival Time", ylab = "Hazard Function", main = "Hazard Functions", type = "l", 
lty = 1, lwd = 1, col = NA, legpos = "right", ...)

plot_survival(x, gr.subset, var.subset, group = TRUE, xlim = NA, ylim = NA, 
xlab = "Survival Time", ylab = "Survival Function", main = "Survival Functions", 
type = "l", lty = 1, lwd = 1, col = NA, legpos = "right", ...)

plot_profile(x, method = "mean", type = "b", pch = 19, lty = 1, lwd = 1, col = NA, 
xlab = "Variables", leglab = NA, ylab = NA, main = NA, legpos = "topright", ...)

Arguments

x

object of class mws from phmclust

gr.subset

Optional vector for plotting subset of clusters

var.subset

Optional vector for plotting subset of variables

group

if TRUE hazard/survival plots are produced for each group, if FALSe for each variable

method

"mean" for cluster mean profile plot and "median" for cluster median profile plot

xlim

limits for x-axis

ylim

limits for y-axis

xlab

label for x-axis

ylab

label for y-axis

main

title of the plot

leglab

label for the legend

type

type of plot

lty

line type

lwd

line width

pch

type of plotting points

col

colors; if NA it is determined in the function

legpos

position of the legend; "topright","topleft","bottomright", "bottomleft","left","right","top", or "center"

...

Additional plot options

See Also

phmclust

Examples


##Plots for mixture Weibull model with 3 components
data(webshop)
res <- phmclust(webshop, 3)

##Hazard plot for first and third group, all pages
plot_hazard(res, gr.subset = c(1,3), group = TRUE, xlab = "Dwell Time")

##Survival plot for each group, first 6 pages
plot_survival(res, var.subset= 1:6, group = FALSE, xlab = "Dwell Time")

##Cluster profile plot
plot_profile(res, xlab = "Pages", ylab = "Mean Dwell Time", main = "Cluster Profile")


[Package mixPHM version 0.7-2 Index]