confin.eq_pop_var:

Usage Arguments Examples

View source: R/confin.Main.r

Usage

1
confin.eq_pop_var(x_vec, y_vec, y)

Arguments

x_vec
y_vec
y

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x_vec, y_vec, y) 
{
    x_len = length(x_vec)
    y_len = length(y_vec)
    x_mean = mean(x_vec)
    y_mean = mean(y_vec)
    x_var = var(x_vec)
    y_var = var(y_vec)
    x_dof = x_len - 1
    y_dof = y_len - 1
    alpha = 1 - y
    al_hf = alpha/2
    fval_hf = qf(al_hf, x_dof, y_dof)
    fval_hf_m = 1/fval_hf
    lower = fval_hf_m * (x_var/y_var)
    upper = fval_hf * (x_var/y_var)
    c(lower, upper)
  }

halka9000stg/MyRStatLib documentation built on Dec. 20, 2021, 2:46 p.m.