Differences between the critical points for two factor's levels
Source:R/criticaldiff.R
criticaldiff.Rd
Differences between the estimation of critical
for two
factor's levels.
Arguments
- model
Parametric or nonparametric regression model obtained by
frfast
function.- level1
First factor's level at which to perform the differences between critical points.
- level2
Second factor's level at which to perform the differences between critical points.
- der
Number which determines any inference process. By default
der
isNULL
. If this term is0
, the calculate of the differences for the critical point is for the estimate. If it is1
or2
, it is designed for the first or second derivative, respectively.
Value
An object is returned with the following elements:
- critical.diff
a table with a couple of factor's level where it is used to calculate the differences between the critical points, and their 95% confidence interval (for the estimation, first and second derivative).
Details
Differences are calculated by subtracting a factor relative to
another (\(level2 - level1\)). By default level2
and
level1
are NULL
, so the differences calculated are for all
possible combinations between two factors. Additionally, it is obtained
the 95% confidence interval for this difference which let us to make
inference about them.
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)
fit2 <- frfast(DW ~ RC : F, data = barnacle, seed = 130853, nboot = 100) # with interactions
criticaldiff(fit2)
#> [[1]]
#> L2 L1 Diff Lwr Upr
#> Estimation lens barca -1.6 -1.6 -0.265
#> First_der lens barca -0.217 -5.298 0.356
#> Second_der lens barca -0.174 <NA> <NA>
#>
criticaldiff(fit2, der = 1)
#> [[1]]
#> L2 L1 Diff Lwr Upr
#> First_der lens barca -0.217 -5.298 0.356
#>
criticaldiff(fit2, der = 1, level1 = "lens", level2 = "barca")
#> L2 L1 Diff Lwr Upr
#> First_der barca lens 0.217 -0.356 5.298