scat {mgcv} | R Documentation |
Family for use with gam
, implementing regression for the heavy tailed response
variables, y, using a scaled t model. The idea is that (y - mu)/sig ~ t_nu where
mu is determined by a linear predictor, while sig and nu are parameters
to be estimated alongside the smoothing parameters.
scat(theta = NULL, link = "identity")
theta |
the parameters to be estimated nu = 2 + exp(theta_1) and sig = exp(theta_2). If supplied and positive, then taken to be fixed values of nu and sig. If any negative, then absolute values taken as starting values. |
link |
The link function: one of |
Useful in place of Gaussian, when data are heavy tailed.
An object of class extended.family
.
Natalya Pya (nyp20@bath.ac.uk)
Wood, S.N., N. Pya and B. Saefken (2015), Smoothing parameter and model selection for general smooth models. http://arxiv.org/abs/1511.03864
library(mgcv) ## Simulate some t data... set.seed(3);n<-400 dat <- gamSim(1,n=n) dat$y <- dat$f + rt(n,df=3)*2 b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=scat(link="identity"),data=dat) b plot(b,pages=1)