Learn R Programming

npregfast (version 1.2.0)

critical: 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 frfast function.
der
Number which determines any inference process. By default der is NULL. If this term is 0, the calculation is for the point which maximize the estimate. If it is 1 it is designed for the first derivative

Value

  • An object is returned with the following elements:
  • Estimationx value which maximize the regression function with their 95% confidence intervals (for each level).
  • First_derx value which maximize the first derivative with their 95% confidence intervals (for each level).
  • Second_derx value which equals the second derivative to zero with their 95% confidence intervals (for each level).

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab