View source: R/ms.varexplore.R
ms.varexplore | R Documentation |
This function can be used to help select a plausible value for the variance/SD of the random intercept for site in a multisite trial with a binary outcome. Based on user-supplied values of the outcome proportions in the two conditions, this function outputs, for a range of possible values of the SD, the intervals within which we expect about 95% of the site-specific odds ratios to lie.
ms.varexplore(pc, pt, print = TRUE)
pc |
The probability of the outcome in control clusters. |
pt |
The probability of the outcome in treatment clusters. |
print |
Whether or not to print the results in a table; defaults to TRUE. To retrieve the results even when print = FALSE, assign the function output to an object. |
In a multisite trial design, participants are randomized to conditions within site. The use of this function is illustrated in Crespi CM (2025) Power and Sample Size in R.
A list containing the calculated OR and a dataframe of outputs.
ms.varexplore(pc = 0.1, pt = 0.2)
output <- ms.varexplore(pc = 0.1, pt = 0.2, print = FALSE)
output$OR
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.