Description Usage Arguments Details Value Warnings Note Author(s) References See Also Examples
View source: R/bfFixefLMER_F.fnc.R
This function backfits an initial LMER model either on upper or lowerbound pvalues obtained from function pamer.fnc
, loglikelihood ratio testing (LLRT), AIC, BIC, relLik.AIC, or relLik.BIC. Note that this function CANNOT be used with generalized linear mixedeffects models (glmer
s).
1 2 3 4 5 6 7 
model 
A 
item 
Whether or not to evaluate the addition of byitem random
intercepts to the model, evaluated by way of loglikelihood ratio test.
Either 
method 
Backfitting method. One of "F" (pvalue), "llrt", "AIC",
"BIC", "relLik.AIC", or "relLik.BIC" (relative likelihood, see function

threshold 
Methodspecific threshold for parameter selection. It refers
to alpha in the case of "F" and "llrt", to the minimum reduction in
likelihood in the case of "AIC" and "BIC", or to the minimum difference
in probability in the case of "relLik.AIC" and "relLik.BIC". Defaults

alpha 
If the
method is 
alphaitem 
Alpha value for the evaluation of byitem
random intercepts. Defaults to 
prune.ranefs 
Logical. Whether to remove any random
effect for which its variable is not also present in the fixed effects
structure (with the exception of the grouping variables such as

p.value 
If 
set.REML.FALSE 
Logical. Whether or not to set

keep.single.factors 
Logical. Whether or not main effects are kept (not
subjected to testing and reduction). Defaults to 
reset.REML.TRUE 
Logical. Whether or not to reset the backfitted
model to 
log.file 
Whether a backfitting log
should be saved. Defaults to 
The backfitting process works as follows:
If
argument method
is not set to F
, REML
is set to
FALSE
;
First consider only highestorder interaction model terms:
If method
is F
, the model term
with the highest ANOVA pvalue is identified. If this
pvalue is higher than alpha
,the model term is
removed and a new model is fitted. This is repeated for each model
term that has a pvalue higher than the alpha
value.
The algorithm then moves on to step (b). If method
is not
F
, the model term with the lowest pvalue is
identified and the following is evaluated:
A new model without this model term is fitted;
The more complex
and simpler models are compared by way of a loglikelihood
ratio test in case method
is "llrt", by way of AIC or
BIC values in case method
is "AIC" or "BIC", or by
calculating the relLik
based on AIC or BIC in case
method
is "relLik.AIC" or "relLik.BIC". If the result
determines that the term under consideration does not increase
model fit, it is removed; otherwise it is kept.
Move on
to the next model term with the smallest pvalue smaller
than alpha
and repeat steps (i)–(iii).
Once
all highestorder interaction terms have been evaluated, go down to
the second highest order interactions: Repeat steps (ai)–(aiii)
with the following addition: If a term would be removed from the
model, but it is part of a highorder interaction, keep it. Once
all terms of the interaction level have been evaluated, move down
to the next lowerorder level until main effects have been
evaluated, after which the process stops. If keep.single
factors = TRUE
, the process stops after the evaluation of all
interaction terms.
If argument method
is set to
something else other than "F", set reset.REML.TRUE
to
TRUE
(default) unless otherwise specified.
In brief, if method
is set to "F", a term remains in the model if its
pvalue is equal to or greater than alpha
; if method
is
set to something else, a term remains in the model if
its
pvalue from the ANOVA is equal to or smaller than alpha
;
it significantly increases model fit as determined by the specified method;
it is part of a significant higherorder interaction term.
This backfitting method was used in Newman, Tremblay, Nichols, Neville, and Ullman (2012). If factorial terms are included in the initial model, backfitting on F is recommended.
A mer
model
with backfitted fixed effects is returned and a log of the backfitting
process is printed on screen and (by default) in a log file in a temporary
file.
Upperbound pvalues can be anticonservative, while
lowerbound pvalues can be conservative. See function
pamer.fnc
.
If you get this error:
1 2 
It is probably because you updated the model using function update
and
the data now appears as data = ..2
or something similar to this. You can
check this by typing model@call
. If this is the case, refit your model
as lmer(DV ~ IV + IV + (RANEF), data = dat)
.
Antoine Tremblay, Statistics Canada, trea26@gmail.com and Johannes Ransijn johannesransijn@gmail.com.
Newman, A.J., Tremblay, A., Nichols, E.S., Neville, H.J., and Ullman, M.T. (2012). The Influence of Language Proficiency on Lexical Semantic Processing in Native and Late Learners of English. Journal of Cognitive Neuroscience, 25, 1205–1223.
bfFixefLMER_t.fnc;
ffRanefLMER.fnc;
fitLMER.fnc;
mcposthoc.fnc;
pamer.fnc;
mcp.fnc;
relLik;
romr.fnc;
perSubjectTrim.fnc.
1  # see example in LMERConvenienceFunctions help page.

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.