1 #ifndef GENESIS_UTILS_MATH_REGRESSION_LINK_H_ 2 #define GENESIS_UTILS_MATH_REGRESSION_LINK_H_ 66 std::function<double( double mu )>
link;
101 link.
link = [](
double mu )
103 return std::log( mu / ( 1.0 - mu ));
107 return std::exp( eta ) / ( 1.0 + std::exp( eta ));
111 return 1.0 / ( mu * ( 1.0 - mu ));
129 link.
link = [](
double mu )
131 return std::log( mu );
135 return std::exp( eta );
157 link.
link = [](
double mu )
186 link.
link = [](
double mu )
196 return 1.0 / ( mu * mu );
204 #endif // include guard Link
List of common GLM Link functions.
GlmLink glm_link_log()
Log link functions.
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
bool is_defined(GlmFamily const &family)
Check whether all necessary values and functors of a GlmFamily are set.
GlmLink glm_link_inverse()
Inverse link functions.
std::function< double(double mu)> derivative
Derivative of the link function.
GlmLink glm_link_identity()
Identity link functions.
std::function< double(double mu)> link
Link function.
Link id
Internal ID, used to check if the link is the canonical one for a distribution family.
std::function< double(double eta)> inverse_link
Inverse of the link function.
GlmLink glm_link_logit()
Logit link functions.