likelihood_null: Binomial likelihood under the null hypothesis

Description Usage Arguments Value Examples

View source: R/EC.R

Description

This function evaluates the binomial likelihood under P.T-P.C=-delta0

Usage

1
likelihood_null(x.T, x.C, N.T, N.C, P.T, delta0)

Arguments

x.T

positive integer representing the observed number of responders in the treatment group

x.C

positive integer representing the observed number of responders in the control group

N.T

positive integer representing the sample size in the treatment group

N.C

positive integer representing the sample size in the control group

P.T

numeric between 0 and 1 representing the proportion of responders in the treatment group

delta0

numeric between 0 and 1 representing the noninferiority margin

Value

numeric representing the probability of getting the observed outcome under the null hypothesis

Examples

1
2
3
4
#The probability of getting 10/20 successes in the treatment group
#and 8/20 in the placebo group when the proportion of responders
#is 30% and the noninferiority margin is 10% can be calculated by
likelihood_null(x.T=10, x.C=8, N.T=20, N.C=20, P.T=0.3, delta0=0.1)

NourHawila/EC documentation built on Feb. 24, 2022, 8:24 a.m.