Description Usage Arguments Value Author(s) See Also Examples

View source: R/MarginalProbs.R

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.