gencensg: Censored sample from mixture of gamma distributions with...

Description Usage Arguments Value See Also Examples

Description

gencensg generates a censored sample from the mixture of gamma distributions with mixing probabilities of components given by the matrix p.

Usage

1
gencensg(p, shape, rate, shapec, ratec)

Arguments

p

matrix (or data frame) of mixing probabilities. with rows corresponding to subjects. and columns coresponding to the mixture components.

shape

vector of shape parameters for gamma distributions of non-censored components.

rate

vector of rate parameters for gamma distributions of non-censored components.

shapec

vector of shape parameters for gamma distributions of components' censors.

ratec

vector of rate parameters for gamma distributions of components' censors.

Value

a data frame with the censored sample. The attribute $x contains the sample values, the attribute $delta contains the indicators of non-censoring.

The sample size equals the rows number of p.

See Also

Maiboroda R. Khizanov V. A modified Kaplan–Meier estimator for a model of mixtures with varying concentrations Theor. Probability and Math. Statist. 92 (2016), 109-116

Examples

1
2
3
4
set.seed(3)
cs <- gencensg(genunifp(50,2),shape=c(2,1),rate=c(0.5,0.5),
shapec=c(1,1),ratec=c(0.3,0.3))
plot(cs$x,col=cs$delta+1)

RostyslavMaiboroda/mixvconc documentation built on June 12, 2019, 12:34 a.m.