dgpTP: Generates bivariate survival data

View source: R/dgpTP.R

dgpTPR Documentation

Generates bivariate survival data

Description

Generates bivariate censored gap times from some known copula functions.

Usage

dgpTP(n, corr, dist, dist.par, model.cens, cens.par, state2.prob)

Arguments

n

Sample size.

corr

Correlation parameter. Possible values for the bivariate exponential distribution are between -1 and 1 (0 for independency). Any value between 0 (not included) and 1 (1 for independency) is accepted for the bivariate Weibull distribution.

dist

Distribution. Possible bivariate distributions are “exponential” and “weibull”.

dist.par

Vector of parameters for the allowed distributions. Two (scale) parameters for the bivariate exponential distribution and four (2 location parameters and 2 scale parameters) for the bivariate Weibull distribution. See details below.

model.cens

Model for censorship. Possible values are “uniform” and “exponential”.

cens.par

Parameter for the censorship distribution. For censure model equal to “exponential” the argument cens.par must be greater than 0. For censure model equal to “uniform” the argument must be greater or equal than 0.

state2.prob

The proportion of individuals that enter state 2.

Details

The bivariate exponential distribution, also known as Farlie-Gumbel-Morgenstern distribution is given by

F(x,y)=F_1(x)F_2(y)[1+α(1-F_1(x))(1-F_2(y))]

for x≥0 and y≥0. Where the marginal distribution functions F_1 and F_2 are exponential with scale parameters θ_1 and θ_2 and correlation parameter α, -1 ≤ α ≤ 1.

The bivariate Weibull distribution with two-parameter marginal distributions. It's survival function is given by

S(x,y)=P(X>x,Y>y)=exp^(-[(x/θ_1)^(β_1/δ)+(y/θ_2)^(β_2/δ)]^δ)

Where 0 < δ ≤ 1 and each marginal distribution has shape parameter β_i and a scale parameter θ_i, i = 1, 2.

Value

An object of class ‘survTP’.

Author(s)

Artur Araújo, Javier Roca-Pardiñas and Luís Meira-Machado

References

Araújo A, Meira-Machado L, Roca-Pardiñas J (2014). TPmsm: Estimation of the Transition Probabilities in 3-State Models. Journal of Statistical Software, 62(4), 1-29. doi: 10.18637/jss.v062.i04

Devroye L. (1986). Non-Uniform Random Variate Generation, New York: Springer-Verlag.

Johnson M. E. (1987). Multivariate Statistical Simulation, John Wiley and Sons.

Johnson N., Kotz S. (1972). Distributions in statistics: continuous multivariate distributions, John Wiley and Sons.

Lu J., Bhattacharya G. (1990). Some new constructions of bivariate weibull models. Annals of Institute of Statistical Mathematics, 42(3), 543-559. doi: 10.1007/BF00049307

Meira-Machado L., Faria S. (2014). A simulation study comparing modeling approaches in an illness-death multi-state model. Communications in Statistics - Simulation and Computation, 43(5), 929-946. doi: 10.1080/03610918.2012.718841

Meira-Machado, L., Sestelo M. (2019). Estimation in the progressive illness-death model: a nonexhaustive review. Biometrical Journal, 61(2), 245–263. doi: 10.1002/bimj.201700200

See Also

corrTP.

Examples

# Set the number of threads
nth <- setThreadsTP(2)

# Example for the bivariate Exponential distribution
dgpTP(n=100, corr=1, dist="exponential", dist.par=c(1, 1),
model.cens="uniform", cens.par=3, state2.prob=0.5)

# Example for the bivariate Weibull distribution
dgpTP(n=100, corr=1, dist="weibull", dist.par=c(2, 7, 2, 7),
model.cens="exponential", cens.par = 6, state2.prob=0.6)

# Restore the number of threads
setThreadsTP(nth)

TPmsm documentation built on Jan. 14, 2023, 1:17 a.m.