ancova | R Documentation |

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.

```
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, ...)
```

`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 |

`nboot` |
number of bootstrap samples |

`...` |
currently ignored. |

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 |

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

`t2way`

```
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)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.