Giter VIP home page Giter VIP logo

afex's Introduction

afex: Analysis of Factorial EXperiments

The two main functionalities of afex are (1) to provide a coherent and intuitive interface to run standard ANOVAs with any number of within- or between-subjects variables (the relevant functions are now called aov_car, aov_ez, and aov_4) and (2) to provide p-values for fixed effects in mixed models using lme4 via function mixed. The default outputs of those functions can be directly passed to lsmeans for post-hoc tests or contrasts.

Installation

  • afex is available from CRAN so the current stable version can be installed directly via: install.packages("afex")

  • To install the latest development version you will need the devtools package: devtools::install_github("singmann/afex@master")

What is New

As of version 0.14 several changes to the interface were introduced:

  • ANOVA functions renamed to aov_car, aov_ez, and aov_4. Old ANOVA functions are now deprecated.

  • new default return argument for ANOVA functions afex_aov, an S3 object containing the following:

    1. ANOVA table of class "anova"
    2. ANOVA fitted with base R's aov (can be passed to lsmeans for post-hoc tests)
    3. output from car::Anova (for tests of effects), ANOVA table 1. is based on this model
    4. lm object passed to car::Anova
    5. data used for estimating 2. and 4.
  • added support for lsmeans: objects of class afex_aov can be passed to lsmeans directly. afex now depends on lsmeans.

  • added three new real example data sets and a vignette showing how to calculate contrasts after ANOVA.

  • added expand_re argument to mixed which, if TRUE, correctly interprets the || notation in random effects with factors (i.e., suppresses estimation of correlation among random effects). lmer_alt is a wrapper for mixed which uses expand_re = TRUE, returns an object of class merMod (i.e., does not calculate p-values), and otherwise behaves like g/lmer (i.e., does not enforce certain contrasts)

  • nice.anova was renamed to nice (and now also works with mixed objects).

  • Returned objects of mixed and the ANOVA functions (i.e., of class afex_aov) are similar:

    • Both have a numeric Anova table as first element called anova_table (which is of class c("anova", "data.frame")).
    • calling nice on either returns a nicely rounded Anova table (i.e., numbers converted to characters). This table is also per default printed.
    • calling anova on either will return the numeric Anova table (for which print methods exist as well).
  • added afex_options() functionality for setting options globally.

  • afex does not depend on car package anymore, it is only imported.

  • first element in mixed object renamed to anova_table.

  • summary method for mixed objects now calls summary.merMod on full model.

afex's People

Contributors

hoechenberger avatar singmann avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.