Description Usage Arguments Examples
Plot the weights of an mtlr object. If packages ggplot2 and reshape2 are not installed, a bargraph of feature influence is given where influence is defined as the sum of absolute values of the feature weights across time. If ggplot2 and reshape2 are installed then a plot of feature weight across time is given.
1 2 3 |
x |
an object of class mtlr (result from calling |
numfeatures |
the number of weight to plot. Default is 5. The most influential features are chosen first. |
featurenames |
the names of the specific weight to plot. These should correspond to the names in x$weight_matrix. If featurenames are supplied, then numfeatures is ignored. |
digits |
the number of digits to round to for the value of the time points. |
... |
for future methods |
1 2 3 4 5 6 7 8 9 | #These examples are geared towards users who have installed ggplot2 and reshape2.
library(survival)
mod <- mtlr(Surv(time,status)~., data = lung)
#Basic plot with 5 most influential features
plot(mod)
#Plot all 8 features
plot(mod, numfeatures = 8)
#Suppose we want to see specifically the "meal.cal" and "ph.karno" features:
plot(mod, featurenames = c("meal.cal", "ph.karno"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.