plotly_spRMM | R Documentation |
plotly
.
This is an updated version of plotspRMM
function. For technical details, please refer to plotspRMM.
plotly_spRMM(sem, tmax = NULL, width = 3 , col = '#1f77b4', cex = 3, title.size = 15 , title.x = 0.5 , title.y = 0.95, xlab.size = 15 , xtick.size=15 , ylab.size = 15 , ytick.size=15)
sem |
An object returned by |
tmax |
The max time for x axis, set to some default value if |
width |
Width of lines. |
col |
Color of lines. |
cex |
Size of dots. |
title.size |
Size of the main title. |
title.x |
Horizontal position of the main title. |
title.y |
Vertical position of the main title. |
xlab.size |
Size of the label of X-axis. |
xtick.size |
Size of the tick of X-axis. |
ylab.size |
Size of the label of Y-axis. |
ytick.size |
Size of the tick of Y-axis. |
The four plots returned.
Didier Chauveau
Bordes, L., and Chauveau, D. (2016), Stochastic EM algorithms for parametric and semiparametric mixture models for right-censored lifetime data, Computational Statistics, Volume 31, Issue 4, pages 1513-1538. https://link.springer.com/article/10.1007/s00180-016-0661-7
Related functions: spRMM_SEM
, plotspRMM
.
Other models and algorithms for censored lifetime data
(name convention is model_algorithm):
expRMM_EM
,
weibullRMM_SEM
.
## Not run: n=500 # sample size m=2 # nb components lambda=c(0.4, 0.6) # parameters meanlog=3; sdlog=0.5; scale=0.1 set.seed(12) # simulate a scaled mixture of lognormals x <- rlnormscalemix(n, lambda, meanlog, sdlog, scale) cs=runif(n,20,max(x)+400) # Censoring (uniform) and incomplete data t <- apply(cbind(x,cs),1,min) d <- 1*(x <= cs) tauxc <- 100*round( 1-mean(d),3) cat(tauxc, "percents of data censored.\n") c0 <- c(25, 180) # data-driven initial centers (visible modes) sc0 <- 25/180 # and scaling s <- spRMM_SEM(t, d, scaling = sc0, centers = c0, bw = 15, maxit = 100) plotly_spRMM(s) # default summary(s) # S3 method for class "spRMM" ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.