lmerand permit specification of multiple random effects.
ezMixed( data , dv , random , fixed , fixed_poly = NULL , fixed_poly_max = NULL , family = gaussian , alarm = TRUE , results_as_progress = FALSE , highest = 0 , return_models = FALSE , highest_first = TRUE )
datathat contains the dependent variable. Values in this column must be numeric.
datathat contain random effects.
datathat contain fixed effects.
datathat are already specified in
fixedand contain fixed effects to be fit with polynomials.
fixed_polyspecifying the maximum polynomial degree for each corresponding variable supplied to
fixed_poly. Otherwise, the default maximum degree is 5.
formulae, but instead storing errors encountered in fitting each model.
formulae, but instead storing warnings encountered in fitting each model.
return_models=TRUE) A list similar to
formulaebut instead storing each fitted model.
lmer. Assessment of each effect of interest necessitates building two models: (1) a "unrestricted" model that contains the effect of interest plus any lower order effects and (2) a "restricted" model that contains only the lower order effects (thus "restricting" the effect of interest to zero). These are then compared by means of a likelihood ratio, which needs to be corrected to account for the additional complexity of the unrestricted model relative to the restricted model. This correction can be achieved by either the Akaike Information Criterion (AIC) or the Bayesian Information Criterion (BIC), two equally well-defined but differently motivated approaches to accounting for model complexity. Generally, the BIC imposes a stronger penalty for complexity, yielding corrected likelihood ratios that are more likely to favor the restricted model. Users are encouraged to refer to Kuha (2004, listed in references below) for discussion of the different motivations of AIC and BIC to help decide which suits their application best.
Both complexity-corrected variants of the likelihood ratio returned by
ezMixed are transformed to the log-base-10 scale (also known as the Bel scale), which has the following convenient properties:
#Read in the ANT data (see ?ANT). data(ANT) head(ANT) ezPrecis(ANT) #Run ezMixed on the accurate RT data rt = ezMixed( data = ANT[ANT$error==0,] , dv = .(rt) , random = .(subnum) , fixed = .(cue,flank,group) ) print(rt$summary) #Run ezMixed on the error rate data er = ezMixed( data = ANT , dv = .(error) , random = .(subnum) , fixed = .(cue,flank,group) , family = 'binomial' ) print(er$summary)
Run the code above in your browser using DataCamp Workspace