Description Usage Arguments Examples
Uses the package scam to fit shape constrained gam models of y~ s(x). Gaussian link function. All the scam shape are fitted and the best one is selected. If the smooth term is not significant you may not want to use the model. It depends on your hypothesis and how you are using the model and residuals.
1 | best.model.f(x, y, plot = F)
|
x |
the explanatory variable |
y |
the response variable |
plot |
if T then a plot of the best model (lowest AIC) fit is plotted with pertinent statistics in plot titles |
1 | best.model.f(USArrests$UrbanPop, USArrests$Rape, plot=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.