cost | R Documentation |
Defines a cost function from the residual sum of squares between model and observational data.
cost(p, obs, FUN, fixed.p = NULL, transform, ...)
p |
vector of fitted parameters of the growth model. |
FUN |
function of growth model to be fitted. |
fixed.p |
vector of fixed parameters of the growth model. |
... |
additional parameters passed to the optimizer. |
Function 'cost' is implemented along the lines of the following template, see package FME for details:
cost <- function(p, obs, FUN, fixed.p = NULL, ...) { out <- FUN(obs$time, c(p, fixed.p)) modCost(out, obs, weight = "none", ...) }
an object of class modCost
, see modCost
in
package FME
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.