meanexp.quantile_a: Estimates the parameter 'beta' of an exponentially...

View source: R/meanexp.quantile_a.R

meanexp.quantile_aR Documentation

Estimates the parameter 'beta' of an exponentially distributed 'X' based on the quantile of values.

Description

This function accepts an addition to the expected value of 'X', 'a', which must be known. The calculation is an optimizatoin of 'beta' from an expression deduced from the cummulative distribution function (CDF) of an arbitrary 'X' (which is the mean of the CDF of X_t): X_t ~ exp(beta_t), where beta_t = beta + a_t F_X(x) = 1/N * sum_t=1^N(F_X_t(x_t)) = 1 - 1/N * sum_t=1^N(exp(-x/beta_t)), which is estimated by u = 1 - 1/N * sum_t=1^N(exp(-Q(u)/beta_t)) u = 1 - 1/N * sum_t=1^N(exp(-Q(u)/(beta+a_t))), where Q(u) is the u-quantile. This expression is solved numerically for 'beta'

Usage

meanexp.quantile_a(
  x,
  lower = 0,
  upper = 1,
  prob = 0.5,
  a = 1,
  type = 6,
  MARGIN = NULL
)

Arguments

x

The data.

lower, upper

Used in optimize.

prob

The probability.

a

The added constant.

type

The type of the quantile calculation (see quantile()).

MARGIN

Used in the same way as in apply().


arnejohannesholmin/sonR documentation built on April 14, 2024, 11:39 p.m.