R: Robust ANCOVA

ancova {WRS2} | R Documentation

## Robust ANCOVA

### Description

This function computes robust ANCOVA for 2 independent groups and one covariate. It compares trimmed means. No parametric assumption (e.g. homogeneity) is made about the form of the regression lines. A running interval smoother is used. A bootstrap version which computes confidence intervals using a percentile t-bootstrap is provided as well.

### Usage

    ancova(formula, data, tr = 0.2, fr1 = 1, fr2 = 1, pts = NA)

    ancboot(formula, data, tr = 0.2, nboot = 599, fr1 = 1, fr2 = 1, pts = NA)

### Arguments

`formula` | an object of class formula.
`data` | an optional data frame for the input data.
`tr` | trim level for the mean.
`fr1` | values of the span for the first group (1 means unspecified)
`fr2` | values of the span for the second group (1 means unspecified)
`pts` | can be used to specify the design points where the regression lines are to be compared; if `NA` design points are chosen.
`nboot` | number of bootstrap samples

### Value

Returns an object of class `ancova` containing:

`evalpts` | covariate values (including points close to these values) where the test statistic is evaluated
`n1` | number of subjects at evaluation point (first group)
`n2` | number of subjects at evaluation point (first group)
`trDiff` | trimmed mean differences
`se` | standard errors for trimmed mean differences
`ci.low` | lower confidence limit for trimmed mean differences
`ci.hi` | upper confidence limit for trimmed mean differences
`test` | values of the test statistic
`crit.vals` | critical values
`p.vals` | p-values
`fitted.values` | fitted values from interval smoothing
`call` | function call

### References

Wilcox, R. (2012). Introduction to Robust Estimation and Hypothesis Testing (3rd ed.). Elsevier.

### See Also

`t2way`

### Examples

    head(invisibility)
    ancova(mischief2 ~ cloak + mischief1, data = invisibility)

    ## specifying covariate evaluation points
    ancova(mischief2 ~ cloak + mischief1, data = invisibility, pts = c(3, 4, 8, 1))

    ## bootstrap version
    ancboot(mischief2 ~ cloak + mischief1, data = invisibility)

[Package WRS2 version 0.9-2 Index]