Closed DrFabach closed 1 year ago
model_1 = stan_glm(kid_score ~ mom_hs, family = gaussian(link = "identity"), data = kidiq, refresh = 0)
s = as.array(model_1) mcmc <- do.call(mcmc.list, plyr:::alply(s[, , -(length(s[1, 1, ]))], 2, as.mcmc)) autocorr.diag(mcmc, lags = c(1:50))->AC
is.element("TRUE", AC>0.2)
[x] Il faut rajouter un test sur les autocorrelation : @severacf Comment tu extrait les autocorrelation d'un fit de rstanarm ?
[x] Ajout de la loop si convergence non ok .