fm_ci: Farrington-Manning confidence interval for difference in...

Description Usage Arguments Details Value See Also Examples

View source: R/fm_ci.R

Description

calculates (1-alpha)100% confidence interval for difference in binomial proportions, and rejects/accepts the null hypothesis with respect to the pre-specifid fixed margin

Usage

1
fm_ci(df, m2, y, alpha = 0.025)

Arguments

df

dataframe, output from sim_cont function

m2

numeric, pre-specified fixed margin

y

string, name of the outcome column

alpha

numeric, one-sided alpha, Default: 0.025

Details

returns dataframe with 11 columns and 1 row, inlcuding estimated proportion/n in each group, difference in proportions(group 'c' - group 't'), variance of that difference (using Wald's method), lower and upper bounds of the confidence interval and null hypothesis decision based on m2.

Value

dataframe

See Also

sym recast Normal

Examples

1
2
3
4
5
6
 t <- sim_cont(
 p_C = 0.6, p_T = 0.5, n_arm = 200,
 mu1 = 4, mu2 = 100, sigma1 = 1,
 sigma2 = 20, r12 = -0.3,
 b1 = 0.1, b2 = -0.01)
 fm_ci(t, m2 = 0.1, 'y', alpha = 0.025)

yuliasidi/nibinom documentation built on Dec. 14, 2021, 11:43 p.m.