critical {npregfast} | R Documentation |
Critical points of the regression function
Description
This function draws inference about some critical point in
the support of X
which is associated with some features of the regression
function (e.g., minimum, maximum or inflection points which indicate changes
in the sign of curvature). Returns the value of the covariate x
which maximizes the estimate of the function, the value of the covariate
x
which maximizes the first derivative and the value of the covariate
x
which equals the second derivative to zero, for each level of the
factor.
Usage
critical(model, der = NULL)
Arguments
model |
Parametric or nonparametric regression out
obtained by |
der |
Number which determines any inference process. By default
|
Value
An object is returned with the following elements:
Estimation |
|
First_der |
|
Second_der |
|
Author(s)
Marta Sestelo, Nora M. Villanueva and Javier Roca-Pardinas.
References
Sestelo, M. (2013). Development and computational implementation of estimation and inference methods in flexible regression models. Applications in Biology, Engineering and Environment. PhD Thesis, Department of Statistics and O.R. University of Vigo.
Sestelo, M., Villanueva, N.M., Meira-Machado, L., Roca-Pardinas, J. (2017). npregfast: An R Package for Nonparametric Estimation and Inference in Life Sciences. Journal of Statistical Software, 82(12), 1-27.
Examples
library(npregfast)
data(barnacle)
fit <- frfast(DW ~ RC, data = barnacle) # without interactions
critical(fit)
critical(fit, der = 0)
critical(fit, der = 1)
critical(fit, der = 2)
# fit2 <- frfast(DW ~ RC : F, data = barnacle) # with interactions
# critical(fit2)
# critical(fit2, der = 0)
# critical(fit2, der = 1)
# critical(fit2, der = 2)