Open fobos3 opened 2 years ago
The bass f function, which is the derivative of F, is calculated using a time interval of 1. This yields inaccurate results.
> bass_f function (Time, p, q) { ifelse(Time == 1, bass_F(Time, p, q), bass_F(Time, p, q) - bass_F(Time - 1, p, q)) }
The f function has a closed form equation that should be used instead of the inaccurate numerical differentiation with such large time interval:
(p+q)^2 / p * exp(-(p+q)*20) / ( 1 + q / p * exp(-(p+q)*20))^2
Alternatively, one can simply substitute into the differential equation for F:
f = (1 - F) * (p + q * F).
Thanks for reporting. Would appreciate a Pull request.
The bass f function, which is the derivative of F, is calculated using a time interval of 1. This yields inaccurate results.
The f function has a closed form equation that should be used instead of the inaccurate numerical differentiation with such large time interval:
Alternatively, one can simply substitute into the differential equation for F: