4 Type objective_function<Type>::operator() ()
10 Type nll=-
dgamma(Y,shape,scale,
true).sum();
Type qnorm(Type p, Type mean=0., Type sd=1.)
Quantile function of the normal distribution (following R argument convention).
#define DATA_VECTOR(name)
Get data vector from R and declare it as vector<Type>
Includes and sets all stuff needed to compile the user defined objective function.
#define REPORT(name)
Report scalar, vector or array back to R without derivative information.
Type dgamma(Type y, Type shape, Type scale, int give_log=0)
Density of X where X~gamma distributed.
#define PARAMETER(name)
Get parameter scalar from R and declare it as Type.
Vector class used by TMB.
Type pgamma(Type q, Type shape, Type scale=1.)
Distribution function of the gamma distribution (following R argument convention).