gradient | R Documentation |
Calculates the gradient function of a model
with respect to the parameters, char_vars
, evaluates
it at the provided values
and returns the result as a function of the variable x
.
gradient(model, char_vars, values, weight_fun = function(x) 1)
model |
formula describing the model, which must contain only |
char_vars |
character vector of the parameters of the model. |
values |
numeric vector with the nominal values of the parameters in |
weight_fun |
optional function variable that represents the square of the structure of variance, in case of heteroscedastic variance of the response |
A function depending on x
that's the gradient of the model
with respect to char_vars
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.