22 cerr <<
"Index limits on observed vector are not equal to the Index\n"
23 "limits on the predicted vector in robust_reg_likelihood function\n";
34 double width2=width*width;
39 v_hat =
mean(diff2)+1.e-80;
41 double b=2.*pcon/(width*
sqrt(
PI));
44 + b/(1.+
pow(diff2/(width2*a2*v_hat),2))));
45 log_likelihood += 0.5*diff.
size()*
log(a2*v_hat);
51 return(log_likelihood);
63 cerr <<
"Index limits on observed vector are not equal to the Index\n"
64 "limits on the predicted vector in robust_reg_likelihood function\n";
80 v_hat =
mean(diff2)+1.e-80;
82 double b=2.*pcon/(width*
sqrt(
PI));
85 + b/(1.+
pow(diff2/(a2*v_hat),2))));
86 log_likelihood += 0.5*diff.
size()*
log(a2*v_hat);
90 return(log_likelihood);
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
double sum(const d3_array &darray)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
unsigned int size() const
double mean(const dvector &vec)
Returns computed mean of vec.
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void RETURN_ARRAYS_INCREMENT()
int indexmax() const
Get maximum valid index.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
static _THREAD gradient_structure * _instance
void RETURN_ARRAYS_DECREMENT()
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.
double square(const double value)
Return square of value; constant object.
Fundamental data type for reverse mode automatic differentiation.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
d3_array pow(const d3_array &m, int e)
Description not yet available.
dvariable robust_regression(const dvector &obs, const dvar_vector &pred, double a=0.7)
Description not yet available.