stableEM {mixPHM} | R Documentation |
Stable EM solution
Description
This function performs the clustering for different EM starting values in order to find a stable solution.
Usage
stableEM(x, K, numEMstart = 5, method = "separate", Sdist = "weibull", cutpoint = NULL,
EMoption = "classification", EMstop = 0.0001, maxiter = 1000, print.likvec = TRUE)
Arguments
x |
Data frame or matrix of dimension n*p with survival times ( |
K |
Number of mixture components. |
numEMstart |
Number of different starting solutions |
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 |
EMoption |
|
EMstop |
Stopping criterion for EM-iteration. |
maxiter |
Maximum number of iterations. |
print.likvec |
If |
Details
After the computation of the models for different starting solutions using the
function phmclust
the best model is chosen, i.e., the model with the largest likelihood value.
The output values refer to this final model.
Value
Returns an object of class mws
with the following values:
K |
Number of components |
iter |
Number of EM iterations |
method |
Method with propotionality 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 |
See Also
Examples
## Exponental mixture model with 2 components for 4 different starting solutions
data(webshop)
res <- stableEM(webshop, K = 2, numEMstart = 4, Sdist = "exponential")
res
summary(res)