mrt_binary_power: Calculate power for binary outcome MRT

View source: R/mrt_binary_power.R

mrt_binary_powerR Documentation

Calculate power for binary outcome MRT

Description

Returns power of the hypothesis test of marginal excursion effect (see Details) given a specified sample size in the context of an MRT with binary outcomes with small sample correction using F-distribution. See the vignette for more details.

Usage

mrt_binary_power(avail_pattern, f_t, g_t, beta, alpha, p_t, gamma, n)

Arguments

avail_pattern

A vector of length m that is the average availability at each time point

f_t

Defines marginal excursion effect MEE(t) under alternative together with beta. Assumed to be matrix of size m*p.

g_t

Defines success probability null curve together with alpha. Assumed to be matrix of size m*q.

beta

Length p vector that defines marginal excursion effect MEE(t) under alternative together with f_t.

alpha

Length q vector that defines success probability null curve together with g_t.

p_t

Length m vector of Randomization probabilities at each time point.

gamma

Desired Type I error

n

Sample size

Value

Power of the test for fixed null/alternative and sample size.

Examples

           mrt_binary_power(tau_t_1, f_t_1, g_t_1, beta_1,
                                              alpha_1, p_t_1, 0.05, 100)

MRTSampleSizeBinary documentation built on May 1, 2022, 5:08 p.m.