MarginalProbs: Computes marginal probabilities for a dataset where the...

View source: R/MarginalProbs.R

MarginalProbsR Documentation

Computes marginal probabilities for a dataset where the surrogate and true endpoints are binary

Description

This function computes the marginal probabilities associated with the distribution of the potential outcomes for the true and surrogate endpoint.

Usage

MarginalProbs(Dataset=Dataset, Surr=Surr, True=True, Treat=Treat)

Arguments

Dataset

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.

Surr

The name of the variable in Dataset that contains the binary surrogate endpoint values. Should be coded as 0 and 1.

True

The name of the variable in Dataset that contains the binary true endpoint values. Should be coded as 0 and 1.

Treat

The name of the variable in Dataset that contains the treatment indicators. The treatment indicator should be coded as 1 for the experimental group and -1 for the control group.

Value

Theta_T0S0

The odds ratio for S and T in the control group.

Theta_T1S1

The odds ratio for S and T in the experimental group.

Freq.Cont

The frequencies for S and T in the control group.

Freq.Exp

The frequencies for S and T in the experimental group.

pi1_1_

The estimated \pi_{1 \cdot 1 \cdot}

pi0_1_

The estimated \pi_{0 \cdot 1 \cdot}

pi1_0_

The estimated \pi_{1 \cdot 0 \cdot}

pi0_0_

The estimated \pi_{0 \cdot 0 \cdot}

pi_1_1

The estimated \pi_{\cdot 1 \cdot 1}

pi_1_0

The estimated \pi_{\cdot 1 \cdot 0}

pi_0_1

The estimated \pi_{\cdot 0 \cdot 1}

pi_0_0

The estimated \pi_{\cdot 0 \cdot 0}

Author(s)

Wim Van der Elst, Ariel Alonso, & Geert Molenberghs

See Also

ICA.BinBin

Examples

# 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)




Surrogate documentation built on June 22, 2024, 9:16 a.m.