[R] Robust ANCOVA

Martin Maechler maechler at stat.math.ethz.ch
Mon Mar 28 10:24:18 CEST 2016


>>>>> David Winsemius <dwinsemius at comcast.net>
>>>>>     on Sun, 27 Mar 2016 19:30:31 -0700 writes:

    >> On Mar 27, 2016, at 9:52 AM, HAMID REZA ASHRAFI via
    >> R-help <r-help at r-project.org> wrote:
    >> 
    >> HiI have a set of data with two independent variables, a
    >> pretest (covariate) and posttest (dependent variable).Can
    >> anyone help me run robust ANCOVA?If you wish I can send
    >> you the data file.yours [[alternative HTML version
    >> deleted]]

    > https://cran.r-project.org/web/views/Robust.html

    > help(pac=MASS, rlm)

    > # A starting point perhaps:

    > MASS::rlm( Post ~ pre +IV1 + IV2, data=yourdataframe)

    > David Winsemius Alameda, CA, USA

Indeed.
Or use the more sophisticated (and somewhat more robust /
efficient) methods from package 'robustbase'

install.packages("robustbase")
require("robustbase")
fm <- lmrob(Post ~ pre +IV1 + IV2, setting = "KS2014",
            data=yourdataframe)


where recent research lead to the recommendation of  setting="KS2014",
which indeed maybe relevant for "ANCOVA".

Martin Maechler, ETH Zurich
(and maintainer of 'robustbase', hence "biased" !)



More information about the R-help mailing list