el_mean: Empirical likelihood test for mean

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Computes empirical likelihood for mean parameter.

Usage

1
el_mean(theta, x, maxit = 50L, abstol = 1e-08)

Arguments

theta

Numeric vector of parameters to be tested.

x

Numeric matrix or vector of data. If x is a matrix, each row corresponds to an observation.

maxit

Maximum number of iterations for optimization. Defaults to 50.

abstol

Absolute convergence tolerance for optimization. Defaults to 1e-08.

Value

A list with class c("mean", "melt").

Examples

1
2
3
4
5
6
7
8
9
## scalar mean
theta <- 0
x <- rnorm(100)
el_mean(theta, x)

## vector mean
x <- matrix(rnorm(100), ncol = 2)
theta <- c(0, 0)
el_mean(theta, x)

melt documentation built on Oct. 8, 2021, 9:10 a.m.