int_lap {errint}R Documentation

Building Error Intervals

Description

int_lap computes the error interval of a set of residuals assuming a Laplace distribution with zero location for the noise.

int_gau computes the error interval of a set of residuals assuming a Gaussian distribution with zero mean for the noise.

int_lap_mu computes the error interval of a set of residuals assuming a Laplace distribution.

int_gau_mu computes the error interval of a set of residuals assuming a Gaussian distribution.

int_beta computes the error interval of a set of residuals assuming a Beta distribution.

int_weibull computes the error interval of a set of residuals assuming a Weibull distribution.

See also 'Details'.

int_moge computes the error interval of a set of residuals assuming a MOGE distribution.

Usage

int_lap(phi, s)

int_gau(phi, s, ps = 0, threshold = 10^-2, upper = 10^6)

int_lap_mu(phi, s, ps = stats::median(phi, na.rm = T), threshold = 10^-2,
  upper = 10^6)

int_gau_mu(phi, s, ps = mean(phi, na.rm = T), threshold = 10^-2,
  upper = 10^6)

int_beta(phi, s, original_phi = phi, ps = 10^-4, threshold = 10^-4,
  upper = 1, m1 = mean(phi, na.rm = T), m2 = mean(phi^2, na.rm = T),
  alpha_0 = (m1 * (m1 - m2))/(m2 - m1^2), beta_0 = (alpha_0 * (1 - m1)/m1))

int_weibull(phi, s, ps = 10^-4, threshold = 10^-2, upper = 10^6,
  k_0 = 1)

int_moge(phi, s, ps = 10^-4, threshold = 10^-4, upper = 10^6,
  lambda_0 = 1, alpha_0 = 1, theta_0 = 1)

Arguments

phi

residual values used to compute the error interval.

s

confidence level, e,g. s=0.05 for the standard 95 percent confidence interval.

ps

minimum value to search for solution of the integral equation to solve. See also 'Details'.

threshold

step size to increase ps after each iterarion. See also 'Details'.

upper

maximum value to search for solution of the integral equation to solve. See also 'Details'.

original_phi

original \{\phi_i\} values. Only used for beta distribution.

m1

first moment of the residuals. Used to compute alpha_0.

m2

second moment of the residuals. Used to compute beta_0.

alpha_0

initial value for Newton-Raphson method for the parameter \alpha. See also 'Details' and multiroot.

beta_0

initial value for Newton-Raphson method for the parameter \beta. See also 'Details' and multiroot.

k_0

initial value for Newton-Raphson method for the parameter \kappa. See also 'Details' and multiroot.

lambda_0

initial value for Newton-Raphson method for the parameter \lambda.

theta_0

initial value for Newton-Raphson method for the parameter \theta.

Details

For the Zero-\mu Laplace distribution the value of the corresponding integral equation has a closed solution of the form ps=-\sigma \log{2s}.

For the other distributions, starting with the initial value of ps passed as argument, the value, integral, of the corresponding integral expression is computed (see also 'References' for an in-depth explanation of this integral expression). If integral is smaller than 1-s then ps is increased by a step size of threshold value and integral is recomputed. If integral is greater or equal than 0 or if ps gets bigger than upper, the loop stops and the last value of ps will be its final value.

In addition, for the Beta distribution values of parameters \alpha and \beta are estimated using Newton-Raphson method.

For the Weibull distribution value of parameter \kappa is estimated using Newton-Raphson method and then estimated value of \lambda is computed using a closed form that depends on \kappa.

For the MOGE distribution values of parameters \lambda, \alpha and \theta are estimated using Newton-Raphson method.

See also 'References'.

Value

Returns an object of class c("error_interval","list") with information of the corresponding error interval.

Author(s)

Jesus Prada, jesus.prada@estudiante.uam.es

References

Link to the scientific paper

Prada, Jesus, and Jose Ramon Dorronsoro. "SVRs and Uncertainty Estimates in Wind Energy Prediction." Advances in Computational Intelligence. Springer International Publishing, 2015. 564-577,

with theoretical background for this package is provided below.

http://link.springer.com/chapter/10.1007/978-3-319-19222-2_47

See Also

error_interval

p_laplace

p_gaussian

p_beta

p_weibull

multiroot

p_moge

Examples

int_lap(rnorm(10),0.1)


int_gau(rnorm(10),0.1,0.1,10^-3,10^2)


int_lap_mu(rnorm(10),0.1,0.1,10^-3,10^2)


int_gau_mu(rnorm(10),0.1,0.1,10^-3,10^2)


int_beta(runif(10,0,0.99),0.1,alpha_0=1,beta_0=1)


int_weibull(abs(rnorm(10)),0.1,k_0=2)


int_moge(runif(10,0.01,0.99),0.1,lambda_0=2,alpha_0=3,theta_0=4)

[Package errint version 1.0 Index]