afex_options {afex}  R Documentation 
Set/get global afex options
Description
Global afex options are used, for example, by aov_car
(et al.)
and mixed
. But can be changed in each functions directly using
an argument (which has precedence over the global options).
Usage
afex_options(...)
Arguments
... 
One of four: (1) nothing, then returns all options as a list; (2) a name of an option element, then returns its' value; (3) a namevalue pair which sets the corresponding option to the new value (and returns nothing), (4) a list with optionvalue pairs which sets all the corresponding arguments. The example show all possible cases. 
Details
The following arguments are currently set:

check_contrasts
should contrasts be checked and changed to sumtozero contrasts? Default isTRUE
. 
type
type of sumsofsquares to be used for testing effects, default is 3 which reports Type 3 tests. 
method_mixed
: Method used to obtain pvalues inmixed
, default is"KR"
(which will change to"LRT"
soon). (mixed()
only) 
es_aov
: Effect size reported for ANOVAs (seeaov_car
), default is"ges"
(generalized etasquared). 
correction_aov
: Correction used for withinsubjects factors with more than two levels for ANOVAs (seeaov_car
ornice
), default is"GG"
(GreenhouseGeisser correction). (ANOVA functions only) 
emmeans_model
: Which model should be used by emmeans for followup analysis of ANOVAs (i.e., objects pf class"afex_aov"
)? Default is"univariate"
which uses theaov
model object (if present). The other option is"multivariate"
which uses thelm
model object (which is an object of class"mlm"
in case repeatedmeasures factors are present). 
include_aov
: Should theaov
model be included into ANOVA objects of class"afex_aov"
? Setting this toFALSE
can lead to considerable speed improvements. 
factorize
: Should between subject factors be factorized (with note) before running the analysis? Default isTRUE
. (ANOVA functions only) 
sig_symbols
: Default significant symbols used for ANOVA andmixed
printing. Default isc(" +", " *", " **", " ***")
. 
lmer_function
: Whichlmer
function shouldmixed
orlmer_alt
use. The default is"lmerTest"
which useslmer
,"lme4"
is also possible which useslmer
. Note thatmixed
methods"KR"
and"S"
only work with"lmerTest"
. For the other methods,"lme4"
could be minimally faster, but does not allow to uselmerTest::anova()
. 
return_aov
: Return value of the ANOVA functions (seeaov_car
), default is"nice"
.
Value
depends on input, see above.
Note
All options are saved in the global R options
with prefix
afex.
Examples
afex_options() # see all options
afex_options("return_aov") #get single option
aop < afex_options() # save current options
## Not run:
# change options
afex_options(return_aov = "nice")
afex_options("return_aov") #get single option
afex_options(return_aov = "nice", method_mixed = "LRT")
afex_options("method_mixed") #get single option
# do something
## End(Not run)
afex_options(aop) # reset options