Test rate difference by comparing it to a pre-specified value using the Farrington-Manning test.
Refer to this vignette for more information and examples.
fitFarringtonManning(endpoint, placebo, data, alternative, ..., delta = 0)a data frame with three columns:
armname of the treatment arm.
placeboname of the placebo arm.
estimateestimate of rate difference.
pone-sided p-value for log odds ratio (treated vs placebo).
infosample size in the subset with NA being removed.
zthe z statistics of log odds ratio (treated vs placebo).
Character. Name of the endpoint in data.
Character. String indicating the placebo in data$arm.
Data frame. Usually it is a locked data set.
a character string specifying the alternative hypothesis,
must be one of "greater" or "less", i.e.,
one-sided test is enforced. No default value.
"greater" means superiority of treatment over placebo is established
by rate difference greater than `delta`.
Subset conditions compatible with dplyr::filter.
glm will be fitted on this subset only. This argument can be useful
to create a subset of data for analysis when a trial consists of more
than two arms. By default, it is not specified,
all data will be used to fit the model. More than one condition can be
specified in ..., e.g.,
fitFarringtonManning('remission', 'pbo', data, delta, arm %in% c('pbo', 'low dose'), cfb > 0.5),
which is equivalent to:
fitFarringtonManning('remission', 'pbo', data, delta, arm %in% c('pbo', 'low dose') & cfb > 0.5).
Note that if more than one treatment arm are present in the data after
applying filter in ..., models are fitted for placebo verse
each of the treatment arms.
the rate difference between a treatment arm and placebo under the null. 0 by default.
Farrington, Conor P., and Godfrey Manning. "Test statistics and sample size formulae for comparative binomial trials with null hypothesis of non-zero risk difference or non-unity relative risk." Statistics in medicine 9.12 (1990): 1447-1454.