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

1 | ```
MarginalProbs(Dataset=Dataset, Surr=Surr, True=True, Treat=Treat)
``` |

`Dataset` |
A |

`Surr` |
The name of the variable in |

`True` |
The name of the variable in |

`Treat` |
The name of the variable in |

`Theta_T0S0` |
The odds ratio for |

`Theta_T1S1` |
The odds ratio for |

`Freq.Cont` |
The frequencies for |

`Freq.Exp` |
The frequencies for |

`pi1_1_` |
The estimated |

`pi0_1_` |
The estimated |

`pi1_0_` |
The estimated |

`pi0_0_` |
The estimated |

`pi_1_1` |
The estimated |

`pi_1_0` |
The estimated |

`pi_0_1` |
The estimated |

`pi_0_0` |
The estimated |

Wim Van der Elst, Ariel Alonso, & Geert Molenberghs

1 2 3 4 5 6 7 8 9 | ```
# 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)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.