Learn R Programming

MSPRT (version 2.1)

LR.twoZ: Likelihood ratio in two-sample Z-tests

Description

Given the simple null equals to 0 and a simple alternative hypotheses, this function calculates the likelihood ratio (LR) in favor of the alternative based on an observed data in two-sample Z-tests.

Usage

LR.twoZ(m1, m2, suff.stat1, suff.stat2, alt, sigma0 = 1)

Arguments

m1

a postive numeric (integer); number of samples from Group-1 for computing the LR.

m2

a postive numeric (integer); number of samples from Group-2 for computing the LR.

suff.stat1

numeric; the value of sufficient statistic based on m1 samples from Group-1.

In this case, the sufficient statistic is the mean of those m1 observations.

suff.stat2

numeric; the value of sufficient statistic based on m2 samples from Group-2.

In this case, the sufficient statistic is the mean of those m2 observations.

alt

a numeric; hypothesized value under the simple alternative

sigma0

a positive numeric; the known common population standard deviation (sd)

Default is 1.

Value

Returns a numeric denoting the LR in favor of alt in the two-sample Z-test based on the observations.

References

MSPRT: supplemental information

Examples

Run this code
# NOT RUN {
LR.twoZ(m1= 60, m2= 50, suff.stat1= 20, suff.stat2= 19, alt= 1, sigma0= 1.2)
# }

Run the code above in your browser using DataLab