Differences of factor smooth interactions
Differences of factor smooth interactions
difference_smooths(model, ...) ## S3 method for class 'gam' difference_smooths( model, smooth, n = 100, ci_level = 0.95, newdata = NULL, unconditional = FALSE, frequentist = FALSE, ... )
model |
A fitted model. |
... |
arguments passed to other methods. |
smooth |
character; which smooth to compute differences for. |
n |
numeric; the number of points at which to evaluate the difference between pairs of smooths. |
ci_level |
numeric between 0 and 1; the coverage of credible interval. |
newdata |
data frame of locations at which to evaluate the difference between smooths. |
unconditional |
logical; account for smoothness selection in the model? |
frequentist |
logical; use the frequentist covariance matrix? |
load_mgcv() df <- data_sim("eg4") m <- gam(y ~ fac + s(x2, by = fac) + s(x0), data = df, method = "REML") difference_smooths(m, smooth = "s(x2)")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.