|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 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
std::function< double(double mu)> link
Link function.
bool is_defined(GlmFamily const &family)
Check whether all necessary values and functors of a GlmFamily are set.
GlmLink glm_link_identity()
Identity link functions.
std::function< double(double mu)> derivative
Derivative of the link function.
GlmLink glm_link_logit()
Logit link functions.
GlmLink glm_link_inverse()
Inverse link functions.
Link
List of common GLM Link functions.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
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_log()
Log link functions.