Learn R Programming

popKorn (version 0.3-0)

optimalC: Derive the optimal c

Description

Derives the optimal c value for a given lambda.

Usage

optimalC(lambda, alpha = 0.05, min.loc = "infty", n, p, k = 1, var.known = TRUE)

Arguments

lambda
The value of lambda under consideration. This must be a vector with values between 0 and 1.
alpha
The desired confidence coefficient.
min.loc
The location of the minimum, either at 'zero' or 'infty'.
n
The number of replications per population.
p
The number of populations considered. This must be present if min.loc is equal to 'zero'.
k
The number of populations selected.
var.known
A logical flag indicating if the variance of the observations is known exactly. It is TRUE by default.

Value

The function returns a vector of length equal to that of lambda.

Details

This function will choose the correct equation to use for and use 'uniroot' to find the c-value that corresponds to the desired alpha-level.

See Also

optimalLambda