This function computes the marginal probabilities associated with the distribution of the potential outcomes for the true and surrogate endpoint.
MarginalProbs(Dataset=Dataset, Surr=Surr, True=True, Treat=Treat)
The odds ratio for
The odds ratio for
The frequencies for
The frequencies for
The estimated
The estimated
The estimated
The estimated
The estimated
The estimated
The estimated
The estimated
A data.frame
that should consist of one line per patient. Each line contains (at least) a binary surrogate value, a binary true endpoint value, and a treatment indicator.
The name of the variable in Dataset
that contains the binary surrogate endpoint values. Should be coded as
The name of the variable in Dataset
that contains the binary true endpoint values. Should be coded as
The name of the variable in Dataset
that contains the treatment indicators. The treatment indicator should be coded as
Wim Van der Elst, Ariel Alonso, & Geert Molenberghs
ICA.BinBin
# Open the ARMD dataset and recode Diff24 and Diff52 as 1
# when the original value is above 0, and 0 otherwise
data(ARMD)
ARMD$Diff24_Dich <- ifelse(ARMD$Diff24>0, 1, 0)
ARMD$Diff52_Dich <- ifelse(ARMD$Diff52>0, 1, 0)
# Obtain marginal probabilities and ORs
MarginalProbs(Dataset=ARMD, Surr=Diff24_Dich, True=Diff52_Dich,
Treat=Treat)
Run the code above in your browser using DataLab