This does a few things including R squared, gets the fitted values.
It appears that running the models "as is" without this wrapper does not work with Cache
.
The return of the model in a list solves this problem.
For Caching, the .specialData
should be "omitted" via omitArgs
, and
uniqueEcoregionGroups
should not be omitted.
1 | statsModel(modelFn, uniqueEcoregionGroups, sumResponse, .specialData)
|
modelFn |
A quoted expression of type |
uniqueEcoregionGroups |
Unique values of |
sumResponse |
a sum of all the response variable values
Also to be used to optimize caching, e.g. ignore |
.specialData |
The custom dataset required for the model. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.