Learn R Programming

supcluster (version 1.0.1)

survivalOutcome: Simulates a survival model for use with generate.cluster.data

Description

Given a vector of frailties, say \(x_1,...\), this function generates a censored exponentially distributed random variable with rate equal to \(\mu+\beta x_i\). The censoring distribution is uniform with from \(f\) to \(f+a\).

Usage

survivalOutcome(mu, beta, accrual, followUp)

Arguments

mu

The constant term \(\mu\)

beta

The frailty effect \(\beta\)

accrual

The accrual time \(a\), in a clinical study

followUp

The follow up time \(f\) in a clinical study

Value

A data frame is returned with two columns survival and censor

See Also

coxLink,binaryOutcome,binaryLink

Examples

Run this code
# NOT RUN {
generatedData=generate.cluster.data(.25,npats=25,clusts=c(12,8),beta=c(-5,5),
                                    outcomeModel=survivalOutcome(0,1,1,1))
usBinary=supcluster(generatedData[[1]],outcome="outcome",
maxclusters=5,nstart=100,n=200,fbeta=FALSE,
linkLikelihood=coxLink(generatedData[[2]]))
# }

Run the code above in your browser using DataLab