ORTest: Test for a difference of odds ratios

Description Usage Arguments Details Value See Also Examples

View source: R/TestOR.R

Description

Test for a difference of odds ratios

Usage

1
ORTest(Ntot, ns1, nu1, ns0, nu0)

Arguments

Ntot

matrix integer vector of total trials. One row per subject. Should have four columns named "ns1" "ns0" "nu1" and "nu0"

ns1

numeric integer vector of successes in condition 1 treatment s.

nu1

numeric integer vector of successes in condition 1 treatment u.

ns0

numeric integer vector of successes in condition 0 treatment s.

nu0

numeric integer vector of successes in condition 0 treatment u.

Details

SE of log odds = sqrt(1/n1+1/n2+1/n3+1/n4) SE of difference in log odds = sqrt(SE1^2 +SE2^2) delta = difference in log odds Test delta / SE from standard normal.

Value

numeric vector of one-sided p-values from a standard normal.

See Also

MIMOSA2

Examples

1
2
3
s = simulate_MIMOSA2()
R = MIMOSA2(Ntot=s$Ntot, ns1 = s$ns1, nu1 = s$nu1, nu0 = s$nu0, ns0 = s$ns0,maxit=10)
or_result = ORTest(Ntot = s$Ntot, ns1 = s$ns1, nu1 = s$nu1, nu0 = s$nu0, ns0 = s$ns0)

RGLab/MIMOSA2 documentation built on May 9, 2017, 11:01 p.m.