Learn R Programming

inteli (version 0.1.1)

varR: varR: Calculate Variance Ratio Estimate

Description

This function computes the interval estimation for a two group variance ratio by both LI and CI method.

Usage

varR(
  num.data,
  denom.data,
  conf.level = 0.95,
  df = 2.4,
  lower = 1e-08,
  upper = 1e+06,
  k
)

Value

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.

Arguments

num.data

A numeric vector functioning as a sample data in a numerator position.

denom.data

A numeric vector functioning as a sample data in a denominator position.

conf.level

A confidence level for the CI method, also applied to the LI method.

df

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.

lower

A lower bound of 'uniroot' for the lower limit (LL) calculation. 1e-08 is a default.

upper

An upper bound of 'uniroot' for the upper limit (UL) calculation. 1e+06 is a default.

k

A cutoff value for the LI method. Unless specified, the F-test is used.

Examples

Run this code
x <- rnorm(20, 0, 1)
y <- rnorm(40, 0, 1)
varR(x, y)

Run the code above in your browser using DataLab