gradients {np} | R Documentation |
gradients
is a generic function which extracts gradients
from objects.
gradients(x, ...) ## S3 method for class 'condensity': gradients(x, errors = FALSE, ...) ## S3 method for class 'condistribution': gradients(x, errors = FALSE, ...) ## S3 method for class 'npregression': gradients(x, errors = FALSE, ...) ## S3 method for class 'qregression': gradients(x, errors = FALSE, ...) ## S3 method for class 'singleindex': gradients(x, errors = FALSE, ...)
x |
an object for which the extraction of gradients is meaningful. |
... |
other arguments. |
errors |
a logical value specifying whether or not standard
errors of gradients are desired. Defaults to FALSE . |
This function provides a generic interface for extraction of gradients from objects.
Gradients extracted from the model object x
.
This method currently only supports objects from the np
library.
Tristen Hayfield hayfietj@mcmaster.ca, Jeffrey S. Racine racinej@mcmaster.ca
fitted
, residuals
, coef
,
and se
, for related methods;
np
for supported objects.
x <- runif(10) y <- x + rnorm(10, sd = 0.1) gradients(npreg(npregbw(y~x), gradients=TRUE))