ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions
statsLib.h File Reference

(Last Changed on March 16, 2021 for git-revision c195a5b8666e6a6ef58e1faea6bad9acd8c1557e.)

Library of statistic functions. More...

#include <fvar.hpp>
#include <admodel.h>
#include <df1b2fun.h>
#include <adrndeff.h>

Go to the source code of this file.

Classes

class  plogisTraits< T >
 
class  plogisTraits< double >
 
class  plogisTraits< dvariable >
 
class  plogisTraits< named_dvariable >
 
class  vcubic_spline_function_array
 A class for implementin cubic splines. More...
 

Macros

#define LOGISTIC_HPP
 

Typedefs

typedef vcubic_spline_functionpvcubic_spline_function
 

Functions

dvar_matrix ageLengthKey (const dvar_vector &mu, const dvar_vector &sig, const dvector &x)
 Age Length Key. More...
 
dmatrix ageLengthKey (const dvector &mu, const dvector &sig, const dvector &x)
 Age Length Key. More...
 
dvar_matrix ALK (dvar_vector mu, dvar_vector sig, dvector x)
 
void bicubic_spline (const dvector &x, const dvector &y, dvar_matrix &knots, dvar_matrix &S)
 
dvar_vector cubic_spline (const dvar_vector &spline_nodes, const dvector &ip)
 A Wrapper for the vcubic_spline_function. More...
 
dvariable dbeta (const dvariable &x, const double &shape1, const double &shape2)
 
dvariable dbeta (const dvariable &x, const dvariable &shape1, const dvariable &shape2)
 
dvariable dbeta (const dvariable &x, const prevariable &shape1, const prevariable &shape2)
 
dvariable dbinom (const prevariable &x, const double &n, const double &p)
 
dvariable dbinom (const prevariable &x, const prevariable &n, const double &p)
 
dvariable dbinom (const prevariable &x, const prevariable &n, const prevariable &p)
 
dvariable dbinom (const dvar_vector &x, const dvar_vector &n, const dvar_vector &p)
 
dvariable dbinom (const prevariable &x, const dvar_vector &n, const dvar_vector &p)
 
dvariable dbinom (const dvar_vector &x, const prevariable &n, const dvar_vector &p)
 
dvariable dbinom (const dvar_vector &x, const dvar_vector &n, const prevariable &p)
 
df1b2variable dbinom (const df1b2variable &x, const double &n, const double &p)
 
df1b2variable dbinom (const df1b2variable &x, const df1b2variable &n, const double &p)
 
df1b2variable dbinom (const df1b2variable &x, const df1b2variable &n, const df1b2variable &p)
 
df1b2variable dbinom (const df1b2vector &x, const df1b2vector &n, const df1b2vector &p)
 
df1b2variable dbinom (const df1b2variable &x, const df1b2vector &n, const df1b2vector &p)
 
df1b2variable dbinom (const df1b2vector &x, const df1b2variable &n, const df1b2vector &p)
 
df1b2variable dbinom (const df1b2vector &x, const df1b2vector &n, const df1b2variable &p)
 
dvariable dgamma (const dvariable &x, const double &a, const double &b)
 
dvariable dgamma (const dvariable &x, const dvariable &a, const dvariable &b)
 
dvariable dgamma (const dvector &x, const prevariable &a, const prevariable &b)
 
dvariable dgamma (const dvector &x, const prevariable &a, const dvar_vector &b)
 
dvariable dgamma (const dvector &x, const dvar_vector &a, const dvar_vector &b)
 
dvariable dgamma (const dvector &x, const dvar_vector &a, const prevariable &b)
 
dvariable dinvgamma (const dvariable &x, const double a, const double b)
 
dvariable dlnorm (const prevariable &x, const double &mu, const double &std)
 
dvariable dlnorm (const prevariable &x, const prevariable &mu, const double &std)
 
dvariable dlnorm (const prevariable &x, const prevariable &mu, const prevariable &std)
 
dvariable dlnorm (const dvar_vector &x, const double &mu, const double &std)
 
dvariable dlnorm (const dvar_vector &x, const prevariable &mu, const double &std)
 
dvariable dlnorm (const dvar_vector &x, const prevariable &mu, const prevariable &std)
 
dvariable dmultinom (const dvector &x, const dvar_vector &p)
 
dvariable dmultinom (const dmatrix o, const dvar_matrix &p, dvar_matrix &nu, double &tau2, const double minp)
 
dvariable dmvlogistic (const dmatrix o, const dvar_matrix &p, dvar_matrix &nu, double &tau2, const double minp)
 
dvariable dmvlogistic (const dmatrix o, const dvar_matrix &p, double &tau2)
 
dvariable dnbinom (const double &x, const prevariable &mu, const prevariable &k)
 negative log likelihood of negative binomial with mean=mu and variance = mu + mu^2 /k More...
 
df1b2variable dnbinom (const double &x, const df1b2variable &mu, const df1b2variable &k)
 negative log likelihood of negative binomial with mean=mu and variance = mu + mu^2 /k More...
 
df1b2variable dnbinom (const dvector &x, const df1b2vector &mu, const df1b2variable &k)
 negative log likelihood of negative binomial with mean=mu and variance = mu + mu^2 /k More...
 
df1b2variable dnbinom (const dvector &x, const df1b2vector &mu, const df1b2vector &k)
 negative log likelihood of negative binomial with mean=mu and variance = mu + mu^2 /k More...
 
dvariable dnbinom (const dvector &x, const dvar_vector &mu, const prevariable &k)
 negative log likelihood of negative binomial with mean=mu and variance = mu + mu^2 /k More...
 
dvariable dnbinom (const dvector &x, const dvar_vector &mu, const dvar_vector &k)
 negative log likelihood of negative binomial with mean=mu and variance = mu + mu^2 /k More...
 
dvariable dnbinom_tau (const double &x, const prevariable &mu, const prevariable &tau)
 negative log likelihood of negative binomial with mean and tau More...
 
df1b2variable dnbinom_tau (const double &x, const df1b2variable &mu, const df1b2variable &tau)
 negative log likelihood of negative binomial with mean and tau More...
 
df1b2variable dnbinom_tau (const dvector &x, const df1b2vector &mu, const df1b2variable &tau)
 negative log likelihood of negative binomial with mean and tau More...
 
df1b2variable dnbinom_tau (const dvector &x, const df1b2vector &mu, const df1b2vector &tau)
 negative log likelihood of negative binomial with mean and tau More...
 
dvariable dnbinom_tau (const dvector &x, const dvar_vector &mu, const prevariable &tau)
 negative log likelihood of negative binomial with mean and tau More...
 
dvariable dnbinom_tau (const dvector &x, const dvar_vector &mu, const dvar_vector &tau)
 negative log likelihood of negative binomial with mean and tau More...
 
dvariable dnorm (const prevariable &x, const double &mu, const double &std)
 
dvariable dnorm (const dvar_vector &x, const double &mu, const double &std)
 
dvariable dnorm (const prevariable &x, const double &mu, const double &std, bool bLog)
 
dvariable dnorm (const dvector &x, const prevariable &mu, const prevariable &std)
 
dvariable dnorm (const dvector &x, const prevariable &mu, const prevariable &std, bool dLog)
 
dvariable dnorm (const dvar_vector &residual, const prevariable &std)
 
dvariable dnorm (const dvar_vector &residual, const double &std)
 
dvariable dnorm (const dvar_vector &residual, const dvector &std)
 
dvariable dnorm (const dvar_vector &residual, const dvar_vector std)
 
dvariable dnorm (const dvar_vector &residual)
 
dvariable dnorm (const dmatrix &obs, const dvar_matrix &pred)
 
df1b2variable dnorm (const df1b2variable &x, const double &mu, const double &std)
 
df1b2variable dnorm (const df1b2variable &x, const double &mu, const double &std, bool bLog)
 
df1b2variable dnorm (const df1b2variable &x, const df1b2variable &mu, const df1b2variable &std, bool bLog)
 
df1b2variable dnorm (const df1b2vector &x, const df1b2variable &mu, const df1b2variable &std, bool dLog)
 
dvariable dpois (const double &k, const prevariable &lambda)
 
dvariable dpois (const prevariable &k, const prevariable &lambda)
 
dvariable dstudent_t (const dvar_vector &residual, const dvar_vector &df)
 
dvariable dunif (const dvariable &x, const double min, const double max)
 
df1b2variable dzinbinom (const double &x, const df1b2variable &mu, const df1b2variable &k, const df1b2variable &p)
 ecologically parametarized negative binomial with zero inflation More...
 
dvariable dzinbinom (const double &x, const prevariable &mu, const prevariable &k, const prevariable &p)
 ecologically parametarized negative binomial with zero inflation More...
 
df1b2variable dzinbinom (const dvector &x, const df1b2vector &mu, const df1b2variable &k, const df1b2variable &p)
 ecologically parametarized negative binomial with zero inflation More...
 
df1b2variable dzinbinom (const dvector &x, const df1b2vector &mu, const df1b2vector &k, const df1b2variable &p)
 ecologically parametarized negative binomial with zero inflation More...
 
dvariable dzinbinom (const dvector &x, const dvar_vector &mu, const prevariable &k, const prevariable &p)
 ecologically parametarized negative binomial with zero inflation More...
 
dvariable dzinbinom (const dvector &x, const dvar_vector &mu, const dvar_vector &k, const prevariable &p)
 ecologically parametarized negative binomial with zero inflation More...
 
df1b2variable dzinbinom (const dvector &x, const df1b2vector &mu, const df1b2variable &k, const df1b2vector &p)
 now p is a vector/// More...
 
df1b2variable dzinbinom (const dvector &x, const df1b2vector &mu, const df1b2vector &k, const df1b2vector &p)
 ecologically parametarized negative binomial with zero inflation More...
 
dvariable dzinbinom (const dvector &x, const dvar_vector &mu, const prevariable &k, const dvar_vector &p)
 ecologically parametarized negative binomial with zero inflation More...
 
dvariable dzinbinom (const dvector &x, const dvar_vector &mu, const dvar_vector &k, const dvar_vector &p)
 ecologically parametarized negative binomial with zero inflation More...
 
dvar_vector eplogis (const dvar_vector &x, const dvariable &alpha, const dvariable &beta, const dvariable &gamma)
 
dvector eplogis (const dvector &x, const double &alpha, const double &beta, const double &gamma)
 
void fill (const dmatrix &_d, const dvector &_v)
 
void fill (const dvar_matrix &_d, const dvar_vector &_v)
 
double get_ft (const double &ct, const double &m, const dvector &va, const dvector &ba)
 
dvector get_ft (dvector &ct, const double &m, const dmatrix &V, const dvector &ba)
 Solving the Baranov catch equation for multiple fleets. More...
 
dvector get_ft (dvector &ct, const double &m, const dmatrix &V, const dvector &na, const dvector &wa)
 Solving the Baranov catch equation for multiple fleets. More...
 
dvariable multifan (const dmatrix oprop, const dvar_matrix &pprop, const int &Nsamp)
 
dvariable multifan (const int &n, const dmatrix obs, const dvar_matrix pred, double &nef)
 
dvariable multifan (const double &s, const dvector obsQ, const dvar_vector &preQ, double &nmle)
 
double neff (const dvector &obs, const dvar_vector &pred)
 
dvector pearson_residuals (long m, dvector obs_p, dvector pred_p)
 
template<typename T , typename T1 >
plogisTraits< T >::plogisT plogis (const T1 &x, const T &location, const T &scale)
 
dvector rmvlogistic (const dvector &p, const double &tau2, const int &seed)
 
dvar_matrix splie2 (const dvector &_x1a, const dvector &_x2a, const dvar_matrix &_ya)
 
dvariable splin2 (const dvector &_x1a, const dvector &_x2a, const dvar_matrix _ya, dvar_matrix &_y2a, const double &x1, const double &x2)
 
dvar_vector spline (const dvector &_x, const dvar_vector &_y, double yp1, double ypn)
 Cubic spline interpolation. More...
 
dvariable splint (const dvector &_xa, const dvar_vector &_ya, const dvar_vector &_y2a, double x)
 Cubic spline interpolation allows users to model natural cubic spline (2nd derivative of boundary nodes is set to zero) as an alternative of use of 1st derivative of boundary nodes. More...
 

Detailed Description

Library of statistic functions.

Remarks
This library contains declaratioins for numerous statistical functions that can be used in ADMB TPL files.
Author
Steve Martell, Chris Grandin, Mollie Brooks
Date
12/14/2011

Definition in file statsLib.h.

Macro Definition Documentation

#define LOGISTIC_HPP

Definition at line 107 of file statsLib.h.

Typedef Documentation

Definition at line 261 of file statsLib.h.

Function Documentation

dmatrix ageLengthKey ( const dvector mu,
const dvector sig,
const dvector x 
)

Age Length Key.

Author
Steven James Dean Martell UBC Fisheries Centre
Date
2011-06-28
Parameters
muis the mean length-at-age
sigis the std in mean length-at-age
xis the vector of break points for the length bins
Returns
dmatrix containing the probability of length(x) for a given age(a)
See Also

Definition at line 79 of file alk.cpp.

dvar_matrix ALK ( dvar_vector  mu,
dvar_vector  sig,
dvector  x 
)

Definition at line 105 of file alk.cpp.

void bicubic_spline ( const dvector x,
const dvector y,
dvar_matrix knots,
dvar_matrix S 
)

Definition at line 107 of file vcubicspline.cpp.

dvar_vector cubic_spline ( const dvar_vector spline_nodes,
const dvector ip 
)

A Wrapper for the vcubic_spline_function.

Author
Steven James Dean Martell
Date
2011-06-21
Parameters
spline_nodesa vector of spline knots
ipis a vector of interpreted points
Returns
returns a vector of interpreted points
See Also

Definition at line 93 of file vcubicspline.cpp.

dvariable dbeta ( const dvariable x,
const double &  shape1,
const double &  shape2 
)
Author
Steven Martell
Parameters
shape1= a parameter (a > 0)
shape2= b parameter (b > 0)
Remarks
x must greater than 0 and less than 1. The mean is given by a/(a+b) and the variance ab/((a+b)^2(a+b+1)).

The log density function is implemented as:

\[ -\ln(\Gamma(a+b)) +\ln(\Gamma(a)) + \ln(\Gamma(b))-(a-1)\ln(x)-(b-1)\ln(1-x) \]

Definition at line 37 of file dbeta.cpp.

dvariable dbeta ( const dvariable x,
const dvariable shape1,
const dvariable shape2 
)

Definition at line 58 of file dbeta.cpp.

dvariable dbeta ( const dvariable x,
const prevariable shape1,
const prevariable shape2 
)

Definition at line 79 of file dbeta.cpp.

dvariable dbinom ( const prevariable x,
const double &  n,
const double &  p 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xnumber of sucesses
nis the number of trials
pis the binomial probability
Returns
returns the negative loglikelihood of the normal distribution
See Also

Definition at line 39 of file dbinom.cpp.

dvariable dbinom ( const prevariable x,
const prevariable n,
const double &  p 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xnumber of sucesses
nis the number of trials
pis the binomial probability
Returns
returns the negative loglikelihood of the normal distribution
See Also

Definition at line 63 of file dbinom.cpp.

dvariable dbinom ( const prevariable x,
const prevariable n,
const prevariable p 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xnumber of sucesses
nis the number of trials
pis the binomial probability
Returns
returns the negative loglikelihood of the normal distribution
See Also

Definition at line 86 of file dbinom.cpp.

dvariable dbinom ( const dvar_vector x,
const dvar_vector n,
const dvar_vector p 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xis a vector of the number of sucesses
nis vector for the number of trials
pis a vector for the binomial probability
Returns
returns the negative loglikelihood of the normal distribution
See Also

Definition at line 110 of file dbinom.cpp.

dvariable dbinom ( const prevariable x,
const dvar_vector n,
const dvar_vector p 
)

Definition at line 134 of file dbinom.cpp.

dvariable dbinom ( const dvar_vector x,
const prevariable n,
const dvar_vector p 
)

Definition at line 157 of file dbinom.cpp.

dvariable dbinom ( const dvar_vector x,
const dvar_vector n,
const prevariable p 
)

Definition at line 180 of file dbinom.cpp.

df1b2variable dbinom ( const df1b2variable x,
const double &  n,
const double &  p 
)

Definition at line 203 of file dbinom.cpp.

df1b2variable dbinom ( const df1b2variable x,
const df1b2variable n,
const double &  p 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xnumber of sucesses
nis the number of trials
pis the binomial probability
Returns
returns the negative loglikelihood of the normal distribution
See Also

Definition at line 227 of file dbinom.cpp.

df1b2variable dbinom ( const df1b2variable x,
const df1b2variable n,
const df1b2variable p 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xnumber of sucesses
nis the number of trials
pis the binomial probability
Returns
returns the negative loglikelihood of the normal distribution
See Also

Definition at line 250 of file dbinom.cpp.

df1b2variable dbinom ( const df1b2vector x,
const df1b2vector n,
const df1b2vector p 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xis a vector of the number of sucesses
nis vector for the number of trials
pis a vector for the binomial probability
Returns
returns the negative loglikelihood of the normal distribution
See Also

Definition at line 274 of file dbinom.cpp.

df1b2variable dbinom ( const df1b2variable x,
const df1b2vector n,
const df1b2vector p 
)

Definition at line 298 of file dbinom.cpp.

df1b2variable dbinom ( const df1b2vector x,
const df1b2variable n,
const df1b2vector p 
)

Definition at line 321 of file dbinom.cpp.

df1b2variable dbinom ( const df1b2vector x,
const df1b2vector n,
const df1b2variable p 
)

Definition at line 344 of file dbinom.cpp.

dvariable dgamma ( const dvariable x,
const double &  a,
const double &  b 
)
Date
2/28/2011
Author
Steven Martell
Parameters
xis the quantile and must be greater than 0.
ais the shape parameter and must be positive.
bis the rate parameter and must be positive.
Returns
a dvariable object
See Also

Definition at line 37 of file dgamma.cpp.

dvariable dgamma ( const dvariable x,
const dvariable a,
const dvariable b 
)
Date
2/28/2011
Author
Steven Martell
Parameters
xis the quantile and must be greater than 0.
ais the shape parameter and must be positive.
bis the rate parameter and must be positive.
Returns
a dvariable object
See Also

Definition at line 66 of file dgamma.cpp.

dvariable dgamma ( const dvector x,
const prevariable a,
const prevariable b 
)
Date
8/1/2011
Author
Mollie Brooks
Parameters
xis the quantile and must be greater than 0.
ais the shape parameter and must be positive.
bis the rate parameter and must be positive.
Returns
a dvariable object $ \Sigma_i (-a \ln(b)+\ln(\Gamma(a))-(a-1)\ln(x_i)+b x_i) $
See Also

Definition at line 97 of file dgamma.cpp.

dvariable dgamma ( const dvector x,
const prevariable a,
const dvar_vector b 
)
Date
8/1/2011
Author
Mollie Brooks
Parameters
xis the quantile and must be greater than 0.
ais the shape parameter and must be positive.
bis the rate parameter and must be positive.
Returns
a dvariable object $ \Sigma_i (-a \ln(b_i)+\ln(\Gamma(a))-(a-1)\ln(x_i)+b_i x_i) $
See Also

Definition at line 129 of file dgamma.cpp.

dvariable dgamma ( const dvector x,
const dvar_vector a,
const dvar_vector b 
)
Date
8/1/2011
Author
Mollie Brooks
Parameters
xis the quantile and must be greater than 0.
ais the shape parameter and must be positive.
bis the rate parameter and must be positive.
Returns
a dvariable object $ \Sigma_i (-a_i \ln(b_i)+\ln(\Gamma(a_i))-(a_i-1)\ln(x_i)+b_i x_i) $
See Also

Definition at line 163 of file dgamma.cpp.

dvariable dgamma ( const dvector x,
const dvar_vector a,
const prevariable b 
)
Date
8/1/2011
Author
Mollie Brooks
Parameters
xis the quantile and must be greater than 0.
ais the shape parameter and must be positive.
bis the rate parameter and must be positive.
Returns
a dvariable object $ \Sigma_i (-a_i \ln(b)+\ln(\Gamma(a_i))-(a_i-1)\ln(x_i)+b x_i) $
See Also

Definition at line 197 of file dgamma.cpp.

dvariable dinvgamma ( const dvariable x,
const double  a,
const double  b 
)

Definition at line 16 of file dinvgamma.cpp.

dvariable dlnorm ( const prevariable x,
const double &  mu,
const double &  std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xa differentiable variable
muis a double precision log mean
stda double precision log standard deviation
Returns
returns the negative loglikelihood of the lognormal distribution
See Also

Definition at line 36 of file dlnorm.cpp.

dvariable dlnorm ( const prevariable x,
const prevariable mu,
const double &  std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xa differentiable variable
muis a variable log mean
stda double precision log standard deviation
Returns
returns the negative loglikelihood of the lognormal distribution
See Also

Definition at line 58 of file dlnorm.cpp.

dvariable dlnorm ( const prevariable x,
const prevariable mu,
const prevariable std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xa differentiable variable
muis a variable log mean
stda variable log standard deviation
Returns
returns the negative loglikelihood of the lognormal distribution
See Also

Definition at line 80 of file dlnorm.cpp.

dvariable dlnorm ( const dvar_vector x,
const double &  mu,
const double &  std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xa differentiable vector
muis a double precision log mean
stda double precision log standard deviation
Returns
returns the negative loglikelihood of the lognormal distribution
See Also

Definition at line 102 of file dlnorm.cpp.

dvariable dlnorm ( const dvar_vector x,
const prevariable mu,
const double &  std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xa differentiable vector
muis a prevariable log mean
stda double precision log standard deviation
Returns
returns the negative loglikelihood of the lognormal distribution
See Also

Definition at line 130 of file dlnorm.cpp.

dvariable dlnorm ( const dvar_vector x,
const prevariable mu,
const prevariable std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xa differentiable vector
muis a prevariable log mean
stda prevariable log standard deviation
Returns
returns the negative loglikelihood of the lognormal distribution
See Also

Definition at line 158 of file dlnorm.cpp.

dvariable dmultinom ( const dvector x,
const dvar_vector p 
)

Definition at line 15 of file dmultinom.cpp.

dvariable dmultinom ( const dmatrix  o,
const dvar_matrix p,
dvar_matrix nu,
double &  tau2,
const double  minp 
)

Definition at line 50 of file dmultinom.cpp.

dvariable dmvlogistic ( const dmatrix  o,
const dvar_matrix p,
dvar_matrix nu,
double &  tau2,
const double  minp 
)

Definition at line 15 of file dmvlogistic.cpp.

dvariable dmvlogistic ( const dmatrix  o,
const dvar_matrix p,
double &  tau2 
)

Definition at line 102 of file dmvlogistic.cpp.

dvariable dnorm ( const prevariable x,
const double &  mu,
const double &  std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xa differentiable variable
muthe mean
stda double precision standard deviation
Returns
returns the negative loglikelihood of the normal distribution
See Also

Definition at line 46 of file dnorm.cpp.

dvariable dnorm ( const dvar_vector x,
const double &  mu,
const double &  std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xvariable vector of observations
mua double mean
stda double standard deviation
Returns
returns the sum of negative loglikelihoods of the normal distribution
See Also

Definition at line 130 of file dnorm.cpp.

dvariable dnorm ( const prevariable x,
const double &  mu,
const double &  std,
bool  bLog 
)

Definition at line 59 of file dnorm.cpp.

dvariable dnorm ( const dvector x,
const prevariable mu,
const prevariable std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
xa vector of observations
mua variable mean
stda variable standard deviation
Returns
returns the sum of negative loglikelihoods of the normal distribution
See Also

Definition at line 195 of file dnorm.cpp.

dvariable dnorm ( const dvector x,
const prevariable mu,
const prevariable std,
bool  dLog 
)
dvariable dnorm ( const dvar_vector residual,
const prevariable std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
residuala variable vector of residuals
stda variable standard deviation
Returns
returns the sum of negative loglikelihoods of the normal distribution
See Also

Definition at line 259 of file dnorm.cpp.

dvariable dnorm ( const dvar_vector residual,
const double &  std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
residuala variable vector of residuals
stda double standard deviation
Returns
returns the sum of negative loglikelihoods of the normal distribution
See Also

Definition at line 285 of file dnorm.cpp.

dvariable dnorm ( const dvar_vector residual,
const dvector std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
residuala variable vector of residuals
stda vector of standard deviations
Returns
returns the sum of negative loglikelihoods of the normal distribution
See Also

Definition at line 311 of file dnorm.cpp.

dvariable dnorm ( const dvar_vector residual,
const dvar_vector  std 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
residuala variable vector of residuals
stda variable vector of standard deviations
Returns
returns the sum of negative loglikelihoods of the normal distribution
See Also

Definition at line 382 of file dnorm.cpp.

dvariable dnorm ( const dvar_vector residual)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
residuala variable vector of residuals
Returns
returns the concentrated likelihood for the normal distribution.
See Also

Definition at line 345 of file dnorm.cpp.

dvariable dnorm ( const dmatrix obs,
const dvar_matrix pred 
)
Author
Steven James Dean Martell
Date
2011-06-21
Parameters
obsa matrix of observed values
preda variable matrix of predicted values
Returns
returns the concentrated likelihood for the normal distribution.
See Also

Definition at line 363 of file dnorm.cpp.

df1b2variable dnorm ( const df1b2variable x,
const double &  mu,
const double &  std 
)

Definition at line 90 of file dnorm.cpp.

df1b2variable dnorm ( const df1b2variable x,
const double &  mu,
const double &  std,
bool  bLog 
)

Definition at line 105 of file dnorm.cpp.

df1b2variable dnorm ( const df1b2variable x,
const df1b2variable mu,
const df1b2variable std,
bool  bLog 
)

Definition at line 75 of file dnorm.cpp.

df1b2variable dnorm ( const df1b2vector x,
const df1b2variable mu,
const df1b2variable std,
bool  dLog 
)
dvariable dpois ( const double &  k,
const prevariable lambda 
)
Author
Steven James Dean Martell UBC Fisheries Centre
Date
2011-06-24
Parameters
kobserved number
lambdaepected mean of the distribution
Returns
returns the negative loglikelihood $ -k \ln( \lambda ) - \lambda + \ln(k)! $
See Also

Definition at line 35 of file dpois.cpp.

dvariable dpois ( const prevariable k,
const prevariable lambda 
)
Author
Steven James Dean Martell UBC Fisheries Centre
Date
2011-06-24
Parameters
kobserved number
lambdaepected mean of the distribution
Returns
returns the negative loglikelihood $ -k \ln( \lambda ) - \lambda + \ln(k!) $
See Also

Definition at line 51 of file dpois.cpp.

dvariable dstudent_t ( const dvar_vector residual,
const dvar_vector df 
)
Author
Steven James Dean Martell UBC Fisheries Centre
Date
2011-06-24
Parameters
residualdvar_vector vector of residual differences
dfdvar_vector for the degrees of freedom
Returns
returns the negative loglikelihood of the students's-t density function.
See Also

Definition at line 38 of file studentT.cpp.

dvariable dunif ( const dvariable x,
const double  min,
const double  max 
)

Definition at line 16 of file dunif.cpp.

dvar_vector eplogis ( const dvar_vector x,
const dvariable alpha,
const dvariable beta,
const dvariable gamma 
)

Definition at line 14 of file eplogis.cpp.

dvector eplogis ( const dvector x,
const double &  alpha,
const double &  beta,
const double &  gamma 
)

Definition at line 20 of file eplogis.cpp.

void fill ( const dmatrix _d,
const dvector _v 
)
Author
Steven James Dean Martell UBC Fisheries Centre
Date
2011-07-11
Parameters
_da data matix that is filled with vector v
_va data vector
See Also

Definition at line 40 of file fill.cpp.

void fill ( const dvar_matrix _d,
const dvar_vector _v 
)
Author
Steven James Dean Martell UBC Fisheries Centre
Date
2011-07-11
Parameters
_da data matix that is filled with vector v
_va data vector
See Also

Definition at line 75 of file fill.cpp.

double get_ft ( const double &  ct,
const double &  m,
const dvector va,
const dvector ba 
)
Author
Steven James Dean Martell UBC Fisheries Centre
Date
2011-07-12
Parameters
ctthe observed catch
mthe instantaneous natural mortality rate
vaa vector of age-specific selectivities.
bathe initial numbers or biomass (same units as the catch) at age.
Returns
ft the instantaneous fishing mortality rate for fully selected (va=1) individuals.
See Also

Definition at line 51 of file baranov.cpp.

dvector get_ft ( dvector ct,
const double &  m,
const dmatrix V,
const dvector ba 
)

Solving the Baranov catch equation for multiple fleets.

Author
Steven James Dean Martell UBC Fisheries Centre
Date
2011-07-12
Parameters
cta vector of observed catch for each fleet.
mthe instantaneous natural mortality rate (age-independent).
Va matrix of age-specific selectivities where each row corresponds to the fleet.
bathe initial numbers or biomass (same units as the catch) at age.
Returns
ft a vector of instantaneous fishing mortality rate for fully selected (va=1) individuals for each fishing fleet.
See Also

Definition at line 94 of file baranov.cpp.

dvector get_ft ( dvector ct,
const double &  m,
const dmatrix V,
const dvector na,
const dvector wa 
)

Solving the Baranov catch equation for multiple fleets.

Author
Steven James Dean Martell UBC Fisheries Centre
Date
2011-07-12
Parameters
cta vector of observed catch for each fleet.
mthe instantaneous natural mortality rate (age-independent).
Va matrix of age-specific selectivities where each row corresponds to the fleet.
naa vector of initial numbers or biomass (same units as the catch) at age.
waa vector of mean weights-at-age
Returns
ft a vector of instantaneous fishing mortality rate for fully selected (va=1) individuals for each fishing fleet.
See Also

Definition at line 174 of file baranov.cpp.

dvariable multifan ( const dmatrix  oprop,
const dvar_matrix pprop,
const int &  Nsamp 
)

Definition at line 14 of file multifan.cpp.

dvariable multifan ( const int &  n,
const dmatrix  obs,
const dvar_matrix  pred,
double &  nef 
)

Definition at line 21 of file multifan.cpp.

dvariable multifan ( const double &  s,
const dvector  obsQ,
const dvar_vector preQ,
double &  nmle 
)

Definition at line 31 of file multifan.cpp.

double neff ( const dvector obs,
const dvar_vector pred 
)

Definition at line 28 of file dmultinom.cpp.

dvector pearson_residuals ( long  m,
dvector  obs_p,
dvector  pred_p 
)

Definition at line 16 of file pearsonresiduals.cpp.

template<typename T , typename T1 >
plogisTraits<T>::plogisT plogis ( const T1 &  x,
const T &  location,
const T &  scale 
)
inline

Definition at line 133 of file statsLib.h.

dvector rmvlogistic ( const dvector p,
const double &  tau2,
const int &  seed 
)

Definition at line 15 of file rmvlogistic.cpp.

dvar_matrix splie2 ( const dvector _x1a,
const dvector _x2a,
const dvar_matrix _ya 
)

Definition at line 257 of file vcubicspline.cpp.

Referenced by bicubic_spline().

dvariable splin2 ( const dvector _x1a,
const dvector _x2a,
const dvar_matrix  _ya,
dvar_matrix _y2a,
const double &  x1,
const double &  x2 
)

Definition at line 289 of file vcubicspline.cpp.

Referenced by bicubic_spline().