Learn R Programming

mixPHM (version 0.7-2)

msBIC: PHM model selection with BIC

Description

This function fits models for different proportionality restrictions.

Usage

msBIC(x, K, method = "all", Sdist = "weibull", cutpoint = NULL, EMoption = "classification", EMstop = 0.01, maxiter = 100)

Arguments

x
Data frame or matrix of dimension n*p with survival times (NA's allowed).
K
A vector with number of mixture components.
method
A vector with the methods provided in phmclust: With "separate" no restrictions are imposed, "main.g" relates to a group main effect, "main.p" to the variables main effects. "main.gp" reflects the proportionality assumption over groups and variables. "int.gp" allows for interactions between groups and variables. If method is "all", each model is fitted.
Sdist
Various survival distrubtions such as "weibull", "exponential", and "rayleigh".
cutpoint
Cutpoint for censoring
EMoption
"classification" is based on deterministic cluster assignment, "maximization" on deterministic assignment, and "randomization" provides a posterior-based randomized cluster assignement.
EMstop
Stopping criterion for EM-iteration.
maxiter
Maximum number of iterations.

Value

Returns an object of class BICmat with the following values:
BICmat
Matrix with BIC values
K
Vector with different components
method
Vector with proportional hazard methods
Sdist
Survival distribution

Details

Based on the output BIC matrix, model selection can be performed in terms of the number of mixture components and imposed proportionality restrictions.

See Also

screeBIC

Examples

Run this code

##Fitting 3 Weibull proportional hazard models (over groups, pages) for K=2,3 components
data(webshop)
res <- msBIC(webshop, K = c(2,3), method = c("main.p","main.g"), maxiter = 10)
res 

Run the code above in your browser using DataLab