I am following Wieling (2018) to fit a gam model. After checking for the autocorrelation of residuals, I added the autocorrelation corrections suggested by Wieling. Although the autocorrelation is corrected for, the QQplot obtained with the gam.check() function shows a marked difference between the red line and the residuals. Can anyone help me interpret this?
I copy below the two model fits, the autocorrelation plots and the QQ plots of the two models.
MODEL A
gam_dfw1_f0st_phon_alt_a <- gam(
f0_st ~
s(norm_index, by = PhonInt, k = 15) +
PhonInt +
s(itemCode, bs = "re") +
s(speaker, bs = "re"),
data = dfw1_alt_3syl,
method = "ML"
)
gam.check(gam_dfw1_f0st_phon_alt_a)
acf_gam_dfw1_f0st_phon_alt_a <-
acf_resid(gam_dfw1_f0st_phon_alt_a)
MODEL B (with correction for autocorrelation)
gam_dfw1_f0st_phon_alt_b <- bam(
f0_st ~
s(norm_index, by = PhonInt, k = 15) +
PhonInt +
s(itemCode, bs = "re") +
s(speaker, bs = "re"),
rho = acf_gam_dfw1_f0st_phon_alt_a[2],
AR.start = dfw1_alt_3syl$start.event,
data = dfw1_alt_3syl,
method = "ML"
)
gam.check(gam_dfw1_f0st_phon_alt_b)
acf_gam_dfw1_f0st_phon_alt_b <-
acf_resid(gam_dfw1_f0st_phon_alt_b)



