# NOT RUN {
data(simdat)
# add missing values to simdat:
simdat[sample(nrow(simdat), 15),]$Y <- NA
# }
# NOT RUN {
# Run GAMM model:
m1 <- bam(Y ~ te(Time, Trial)+s(Subject, bs='re'), data=simdat)
# No plotting:
start_value_rho(m1)
# With plot:
rhom1 <- start_value_rho(m1, plot=TRUE)
# }
# NOT RUN {
# see the vignette for examples:
vignette('acf', package='itsadug')
# }
Run the code above in your browser using DataLab