phmclust {mixPHM} | R Documentation |
Fits mixtures of proportional hazard models
Description
This function allows for the computation of proportional hazards models with different distribution assumptions on the underlying baseline hazard. Several options for imposing proportionality restrictions on the hazards are provided. This function offers several variations of the EM-algorithm regarding the posterior computation in the M-step.
Usage
phmclust(x, K, method = "separate", Sdist = "weibull", cutpoint = NULL, EMstart = NA,
EMoption = "classification", EMstop = 0.01, maxiter = 100)
Arguments
x |
Data frame or matrix of dimension n*p with survival times ( |
K |
Number of mixture components. |
method |
Imposing proportionality restrictions on the hazards:
With |
Sdist |
Various survival distrubtions such as |
cutpoint |
Integer value with upper bound for observed dwell times. Above this cutpoint, values are regarded as censored. If NULL, no censoring is performed |
EMstart |
Vector of length n with starting values for group membership,
|
EMoption |
|
EMstop |
Stopping criterion for EM-iteration. |
maxiter |
Maximum number of iterations. |
Details
The method "separate"
corresponds to an ordinary mixture model. "main.g"
imposes proportionality
restrictions over variables (i.e., the group main effect allows for free-varying variable hazards). "main.p"
imposes proportionality restrictions over groups (i.e., the variable main effect allows for free-varying group hazards).
If clusters with only one observation are generated, the algorithm stops.
Value
Returns an object of class mws
with the following values:
K |
Number of components |
iter |
Number of EM iterations |
method |
Proportionality restrictions used for estimation |
Sdist |
Assumed survival distribution |
likelihood |
Log-likelihood value for each iteration |
pvisit |
Matrix of prior probabilities due to |
se.pvisit |
Standard errors for priors |
shape |
Matrix with shape parameters |
scale |
Matrix with scale parameters |
group |
Final deterministic cluster assignment |
posteriors |
Final probabilistic cluster assignment |
npar |
Number of estimated parameters |
aic |
Akaike information criterion |
bic |
Bayes information criterion |
clmean |
Matrix with cluster means |
se.clmean |
Standard errors for cluster means |
clmed |
Matrix with cluster medians |
References
Mair, P., and Hudec, M. (2009). Multivariate Weibull mixtures with proportional hazard restrictions for dwell time based session clustering with incomplete data. Journal of the Royal Statistical Society, Series C (Applied Statistics), 58(5), 619-639.
Celaux, G., and Govaert, G. (1992). A classification EM algorithm for clustering and two stochastic versions. Computational Statistics and Data Analysis, 14, 315-332.
See Also
Examples
data(webshop)
## Fitting a Weibll mixture model (3 components) is fitted with classification EM
## Observations above 600sec are regarded as censored
res1 <- phmclust(webshop, K = 3, cutpoint = 600)
res1
summary(res1)
## Fitting a Rayleigh Weibull proportional hazard model (2 components, proportional over groups)
res2 <- phmclust(webshop, K = 2, method = "main.p", Sdist = "rayleigh")
res2
summary(res2)