p2_fun: p2

View source: R/p2_fun.R

p2_funR Documentation

p2

Description

This is the function to calculate the probability p2 when p1 and odds ratio are given.

Usage

p2_fun(p1, theta)

Arguments

p1

A vector containing the probabilities of the outcome falling into each level of the control arm.

theta

The log odds ratio according to expected effect of the experimental treatment.

Value

A numeric vector representing the expected probability distribution of outcomes across levels for the experimental group.


OptOTrials documentation built on Sept. 9, 2025, 5:46 p.m.