# 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

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

### Arguments

`Dataset` |
A |

`Surr` |
The name of the variable in |

`True` |
The name of the variable in |

`Treat` |
The name of the variable in |

### Value

`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 |

### Author(s)

Wim Van der Elst, Ariel Alonso, & Geert Molenberghs

### See Also

`ICA.BinBin`

### Examples

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.