Learn R Programming

lbiassurv (version 1.0)

lbsample: Generates gength bias samples from a parametric family.

Description

Some famous families are used

Usage

lbsample(n, family, par = list(shape, rate, meanlog, sdlog), censor.vec = rexp(n))

Arguments

n
The sample size.
family
Some families
par
Parameters of the family.
censor.vec
A numeric vector of censoring. When the generated sample is bigger than the values of the vector, the function return 1 for censor, meaning that sample is right censored.

Value

  • A list containing numeric time of survivals, the censor indicator, and the onset time.

Details

Add some details if necessary.

References

Thesis of Pierre-Jerome student.

See Also

lbfit.nonpar, lbfit.par.

Examples

Run this code
mydata=lbsample(500,family="exponential",par=list(rate=1))
hist(mydata$data)

Run the code above in your browser using DataLab