# Straight line regression (Canonical RKHS)
mod.orange <- iprior(circumference ~ age, Orange)
plot(mod.orange)
# Multilevel model type plots (Canonical + Pearson RKHS)
mod.tooth1 <- iprior(len ~ ., ToothGrowth)
mod.tooth2 <- iprior(len ~ . ^ 2, ToothGrowth)
par(mfrow = c(1,2))
plot(mod.tooth1, plots = "fitted") # random intercept
plot(mod.tooth2, plots = "fitted") # random slopes & intercept
# One-dimensional smoothing (FBM RKHS with Hurst coef. 0.5)
mod.cars <- iprior(dist ~ speed, cars, model = list(kernel = "FBM"))
plot(mod.cars, plots = "fitted")
Run the code above in your browser using DataLab