Description Usage Arguments Details Value Note Author(s) References See Also Examples
Generates length bias samples from a parametric family.
1 |
n |
An integer indicates the number of the desired samples. |
family |
A string. Options are |
par |
A list of parameters related to the chosen |
censor.vec |
An integer vector of the censoring indicator. When the generated sample is bigger than the values of the vector, the function return 1 in the output, meaning that sample is right censored. |
This function uses the sampling scheme described in Younger(2011).
weibull
: f(x)= k*b*(x*b)^(k-1)*exp(1(x*b)^k)
x>=0, rate=b>0, shape=k>0.
exponential
: f(x)=lambda*exp(-lambda*x)
x>=0, rate=lambda>0.
lognormal
: f(x)=[1/(x*sigma*sqrt(2*pi))]*exp(-[(ln(x)-mu)^2]/2*sigma^2)
x>0, sdlog=sigma>0, meanlog=mu.
loglogistic
: f(x)=[(b/a)*(x/a)^(b-1)]/[1+(x/a)^b]^2
x>=0, rate=1/a>0, shape=b>0.
time |
A vector of |
censor |
A vector of |
onset |
Starting time of the follow up for each individual, sampled from uniform distribution. |
The length of the censor.vec
must match the number of the desired samples.
Pierre-Jerome Bergeron and Vahid Partovi Nia
Jaime Younger. (2011) Goodness-of-Fit for Length-Biased Survival Data with Right-Censoring.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.