This function computes the interval estimation for a two group variance ratio by both LI and CI method.
varR(
num.data,
denom.data,
conf.level = 0.95,
df = 2.4,
lower = 1e-08,
upper = 1e+06,
k
)Point Estimate (PE), lower limit/bound (LL/LB), upper limit/bound (UL/UB), width, sample size, cutoff value k and maximum log-likelihood function value are calculated.
A numeric vector functioning as a sample data in a numerator position.
A numeric vector functioning as a sample data in a denominator position.
A confidence level for the CI method, also applied to the LI method.
A degree of freedom for the LI method in terms of the denominator degree of freedom of the F-test, or (n-df) of LRT, where n is the sum of the sample sizes of the input data. A default value of 2.4 is suggested for a two-group variance ratio interval estimation.
A lower bound of 'uniroot' for the lower limit (LL) calculation. 1e-08 is a default.
An upper bound of 'uniroot' for the upper limit (UL) calculation. 1e+06 is a default.
A cutoff value for the LI method. Unless specified, the F-test is used.
x <- rnorm(20, 0, 1)
y <- rnorm(40, 0, 1)
varR(x, y)
Run the code above in your browser using DataLab