 Computes empirical likelihood for the standard deviation.

## Usage

el_sd(x, mean, sd, weights = NULL, control = el_control())

## Arguments

x

A numeric vector, or an object that can be coerced to a numeric vector.

mean

A single numeric for the (known) mean value.

sd

A positive single numeric for the parameter value to be tested.

weights

An optional numeric vector of weights to be used in the fitting process. The length of the vector must be the same as the length of x. Defaults to NULL, corresponding to identical weights. If non-NULL, weighted empirical likelihood is computed.

control

An object of class ControlEL constructed by el_control().

## Value

An object of class SD.

## Details

Let $$X_i$$ be independent and identically random variable from an unknown distribution $$P$$ for $$i = 1, \dots, n$$. We assume that $${\textrm{E}[X_i]} = {\mu_0}$$ is known and that $$P$$ has a variance $$\sigma_0^2$$. Given a value of $$\sigma$$, the (profile) empirical likelihood ratio is defined by $$R(\sigma) = \max_{p_i}\left\{\prod_{i = 1}^n np_i : \sum_{i = 1}^n p_i (X_i - \mu_0)^2 = \sigma^2,\ p_i \geq 0,\ \sum_{i = 1}^n p_i = 1 \right\}.$$ el_sd() computes the empirical log-likelihood ratio statistic $$-2\log R(\sigma)$$, along with other values in SD.

EL, SD, el_mean(), elt(), el_control()

## Examples

data("women")
x <- women$height w <- women$weight
fit <- el_sd(x, mean = 65, sd = 5, weights = w)
fit
#>
#> 	Weighted Empirical Likelihood
#>
#> Model: sd
#>
#> Maximum EL estimates:
#>  4.34
#>
#> Chisq: 1.843, df: 1, Pr(>Chisq): 0.1746
#> EL evaluation: converged
#>
summary(fit)
#>
#> 	Weighted Empirical Likelihood
#>
#> Model: sd
#>
#> Number of observations: 15
#> Number of parameters: 1
#>
#> Parameter values under the null hypothesis:
#>  5
#>
#> Lagrange multipliers:
#>  -0.01913
#>
#> Maximum EL estimates:
#>  4.34
#>
#> logL: -41.45, logLR: -0.9215
#> Chisq: 1.843, df: 1, Pr(>Chisq): 0.1746
#> EL evaluation: converged
#>