qdev: Sum of squared Differences between Distribution Parameters

qdevR Documentation

Sum of squared Differences between Distribution Parameters

Description

Functions for calculating sum of squared differences between a set of "observed" parameter values and corresponding model distribution parameters

Usage

qdev.TNO(par, obs, prob)

qdev.LOGNO(par, obs, prob)

qdev.WEI(par, obs, prob)

qdev.ZEXP(par, obs, prob)

qdev.GA(par, obs, prob)

qdev.PO(par, obs, prob)

qdev.NBII(par, obs, prob)

qdev.ZIP(par, obs, prob)

Arguments

par

double length=2 parameter values for theoretical distribution

obs

double length=3 observed first quantile, expected value, and second quantile

prob

double length=2 probabilities corresponding to the quantiles, i.e. prob = (p(x < obs[1]), p(x < obs[3])) for a random variable x.

Details

Functions qdev.TNO, qdev.LOGNO, qdev.WEI, qdev.ZEXP, qdev.GA, qdev.PO, qdev.NBII, qdev.ZIP return the sum of squared differences between the expected value (obs[2]) and two quantiles (obs[1], obs[3]) from an empirical distribution and ditto predicted from respectively a given truncated normal-, lognormal-, Weibull-, zero-inflated exponential-, gamma-, Poisson-, negative binomial-, and zero-inflated poisson distribution with parameters par. The lower bound in the truncated normal distribution is always zero, while the upper bound is infinity. With these restrictions all theoretical distributions have two parameters, except the Poisson with only one parameter.

Value

All functions return an unnamed object of length=1 with the sum of squared differences

Author(s)

All functions programmed by Nigel Yoccoz except qdev.ZEXP programmed by Bård Pedersen

Examples

qdev.TNO(par = c(1,1), obs = c(0.1, 1.3, 2), prob = c(0.025, 0.975))
qdev.LOGNO(par = c(1,1), obs = c(0.1, 1.3, 2), prob = c(0.025, 0.975))
qdev.WEI(par = c(1,1), obs = c(0.1, 1.3, 2), prob = c(0.025, 0.975))
qdev.ZEXP(par = c(1,1), obs = c(0.1, 1.3, 2), prob = c(0.025, 0.975))
qdev.ZIP(par = c(1,1), obs = c(0.1, 1.3, 2), prob = c(0.025, 0.975))
qdev.NBII(par = c(1,1), obs = c(0.1, 1.3, 2), prob = c(0.025, 0.975))
qdev.PO(par = c(1,1), obs = c(0.1, 1.3, 2), prob = c(0.025, 0.975))
qdev.GA(par = c(1,1), obs = c(0.1, 1.3, 2), prob = c(0.025, 0.975))


NINAnor/NIcalc documentation built on Oct. 26, 2023, 9:37 a.m.