clusterperm.glmmTMB | R Documentation |
buildglmmTMB
.Cluster-based permutation tests for time series data, based on buildglmmTMB
.
clusterperm.glmmTMB( formula, data = NULL, family = gaussian(), weights = NULL, offset = NULL, series.var = ~0, buildmerControl = list(direction = "order", crit = "LRT", quiet = TRUE), nperm = 1000, type = "regression", parallel = FALSE, progress = "none" )
formula |
A normal formula, possibly using |
data |
The data. |
family |
The family. |
weights |
An optional vector of prior case weights. This vector is evaluated in the calling environment, not in the formula or data frame! |
offset |
An optional vector containing a prior offset term. This vector is evaluated in the calling environment, not in the formula or data frame! |
series.var |
A one-sided formula giving the variable grouping the time series. |
buildmerControl |
Options overriding the defaults in |
nperm |
The number of permutations. |
type |
A character string of either |
parallel |
Whether to parallelize the permutation testing using plyr's |
progress |
A plyr |
If not explicitly overridden in the buildmerControl
argument, the function changes a few buildmer defaults to make more sense for permutation testing. This includes setting direction='order'
and quiet=TRUE
. Set these options explicitly to override this behavior.
Because model comparisons are used for efficient permutation testing, REML is not supported.
Omega squared is not available for mixed-effects ANOVA; the w2
column will not be included in the resulting permutes
object.
The returned object provides the raw bootstrap samples in the pb
attribute. These are used to compute a corrected p-value using Maris & Oostenveld's (2007) cluster mass statistic, but can also be used by the user to compute other such statistics. These obviously significantly increase the size of the R object; if this becomes a problem, there is no harm in deleting them using e.g. attr(x,'perms') <- NULL
.
clusterperm.glmmTMB
is much slower than clusterperm.lmer
, but it is also more flexible, allowing for things like beta regression and zero-inflation.
A data frame.
# buildglmmTMB is much slower than clusterperm.lmer perms <- clusterperm.glmmTMB(Fz ~ Deviant * Session + (Deviant * Session | Subject), data=MMN[MMN$Time > 150 & MMN$Time < 250,],series.var=~Time)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.