When hedges.g is calculated for a combined number of observations greater than 340, usage of the gamma function in the exact calculation causes numerical overflow.
We can switch to using Cohen's approximation: 1 - 3/(4n - 9) or use log-gamma to calculate the exact value.
gamma(dof/2) / ( sqrt(dof/2) * gamma((dof-1)/2))
would become
exp(lgamma(df/2) - log(sqrt(df/2)) - lgamma((df-1)/2)
When
hedges.gis calculated for a combined number of observations greater than 340, usage of thegammafunction in the exact calculation causes numerical overflow.We can switch to using Cohen's approximation:
1 - 3/(4n - 9)or use log-gamma to calculate the exact value.gamma(dof/2) / ( sqrt(dof/2) * gamma((dof-1)/2))would become
exp(lgamma(df/2) - log(sqrt(df/2)) - lgamma((df-1)/2)