Examples and tutorials‎ > ‎Volume I‎ > ‎

Code for Drivers example

#Load the data set
data(Drivers)
 
#Define the formula
formula  = sqrt(y) ~ belt + f(trend,model="rw2",param=c(1,0.0005)) +
                          f(seasonal,model="seasonal",season.length=12,param=c(1,0.1))
 
#lounch the inla function
mod = inla(formula, family="gaussian", data=Drivers,
                control.family=list(param=c(4,4)))
Comments