powered by
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.
LR.twoZ(m1, m2, suff.stat1, suff.stat2, alt, sigma0 = 1)
a postive numeric (integer); number of samples from Group-1 for computing the LR.
a postive numeric (integer); number of samples from Group-2 for computing the LR.
numeric; the value of sufficient statistic based on m1 samples from Group-1.
m1
In this case, the sufficient statistic is the mean of those m1 observations.
numeric; the value of sufficient statistic based on m2 samples from Group-2.
m2
In this case, the sufficient statistic is the mean of those m2 observations.
a numeric; hypothesized value under the simple alternative
a positive numeric; the known common population standard deviation (sd)
Default is 1.
Returns a numeric denoting the LR in favor of alt in the two-sample Z-test based on the observations.
alt
MSPRT: supplemental information
# 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