data(simdat)
# add missing values to simdat:
simdat[sample(nrow(simdat), 15),]$Y <- NA
# 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)
# see the vignette for examples:
vignette("acf", package="itsadug")
Run the code above in your browser using DataLab