Create a data.frame containing the results of an Observed - Expected Analysis
createObservedMinusExpectedTable.RdCreate a data.frame containing the results of an Observed - Expected Analysis
Usage
createObservedMinusExpectedTable(
data,
timeVar,
eventVar,
eventArray,
expectedRate,
cumulativeVar = CumulativeEvents,
observedMinusExpectedVar = ObservedMinusExpected,
indexVar = SubjectIndex,
statusVar = Status,
maxTrialSize = NA,
upperActionLimit = UpperActionLimit,
lowerActionLimit = LowerActionLimit,
upperWarningLimit = UpperWarningLimit,
lowerWarningLimit = LowerWarningLimit,
warningQuantiles = c(lower = 0.01, upper = 0.99),
permittedRates = c(lower = 0.05, upper = 0.15)
)Arguments
- data
The input
data.frame. Required.- timeVar
The column in
datathat defines the order in which participants enrolled. Required.- eventVar
The column in
datathat defines the whether or not a participant experienced an event. Required.- eventArray
An array defining the values of
eventVarthat indicate that the corresponding participant experienced an event. Required.- expectedRate
A scalar that defines the participant-level event rate that is expected. Required.
- cumulativeVar
The name of the column in the output
data.framethat contains the cumulative sum of events. Uses tidy evaluation.- observedMinusExpectedVar
The name of the column in the output
data.framethat contains the calculated observed - expected statistic for each participant. Uses tidy evaluation.- indexVar
The name of the column in the output
data.framethat contains the index of the participant's enrolment: an integer from1tonwherenis number of participants enrolled. Uses tidy evaluation.- statusVar
The name of the column in the output
data.framethat contains the status of the trial: eitherOK,WARNorBREECH- maxTrialSize
A scalar integer defining the maximum possible size of the trial. Can be
NULL.- upperActionLimit
The name of the column in the output
data.framethat contains the upper action limit for this participant. Uses tidy evaluation.- lowerActionLimit
The name of the column in the output
data.framethat contains the lower action limit for this participant. Uses tidy evaluation.- upperWarningLimit
The name of the column in the output
data.framethat contains the upper warning limit for this participant. Uses tidy evaluation.- lowerWarningLimit
The name of the column in the output
data.framethat contains the lower warning limit for this participant. Uses tidy evaluation.- warningQuantiles
a named numeric vector of length 2 with elements
lowerandupperthat define the quantiles of the binomial distribution that define the warning limits. Individual elements may beNA. IfNULL,lowerWarningLimitandupperWarningLimitare ignored and the corresponding columns are not added to the outputdata.frame- permittedRates
a named numeric vector of length 2 with elements
lowerandupperthat define the observed event rates that define the action limits. Individual elements may beNA. IfNULL,lowerActionLimitandupperActionLimitare ignored and the corresponding columns are not added to the outputdata.frame