You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code reads that it should rescale to a maximum of one. But it rescales the terminal value to one, and if dome-shape, then will return values greater than one.
/**
* @brief Nonparametric selectivity function
* @details Estimate one parameter per age/size class, and rescale to maximum of one.
*
* @param x Independent variable (number of classes)
* @param selparms Vector of selectivity parameters (initial values).
* @return Selectivity values.
*/
template<class T>
const T nonparametric(const T &x, const T &selparms)
{
int x2 = x.indexmax();
dvar_vector selex(1,x2);
for (int i=1; i<=x2; i++)
selex(i) = (1.0)/(1.0+mfexp(selparms(i)));
dvariable temp = selex(x2);
selex /= temp;
return selex;
}
The text was updated successfully, but these errors were encountered:
The following code reads that it should rescale to a maximum of one. But it rescales the terminal value to one, and if dome-shape, then will return values greater than one.
The text was updated successfully, but these errors were encountered: