ANCOVAplot: One-way ANCOVA Judgement and Plot

Description Usage Arguments Author(s) References See Also Examples

Description

Judge whether the input data set met the key assumptions for underlie the use of one-way analysis of covariance (ANCOVA). The assumptions include (i) linearity of regression between the dependent variable 'y' and covariate 'x'; (ii) homogeneity of regression slopes among groups (Miller and Chapman, 2001). After judgement, then we continue ANCOVA analysis and plot.

Usage

1
2
3
4
ANCOVAplot(x, y, groups, data, col = 1:length(levels(factor(groups))),
  pch = 1:length(levels(factor(groups))),
  lty = 1:length(levels(factor(groups))), Fig.slope = 1, xlab = NULL,
  ylab = NULL, legendPos = "topleft", ...)

Arguments

x, y, groups

For covariate 'x', dependent 'y' and factor 'groups'.

data

The dataset contains three columns (x,y,groups) data.
See an example via data("isotope",package = "basicANCOVA").

col, pch, lty

The color, pch and linetype for plot.

Fig.slope

If 'Fig.slope = 1', draw graph and output the result of 'ANCOVA with same slope'.
Whereas 'Fig.slope = 0', draw graph and output result of 'linear regression line' for each group.

xlab, ylab

The labels of x-axis and y-axis.

legendPos

The position of legend, such as one of c("none","bottomright","bottom","bottomleft","left","topleft","top","topright","right","center").

...

additional parameters to plot,such as main, sub, xlab, ylab.

Author(s)

Weiping Mei

References

The judging criteria is mainly contributed by
Gregory A. Miller and Jean P. Chapman. (2001). Misunderstanding analysis of covariance. Journal of Abnormal Psychology, 110(1), 40-48. Doi 10.1037//0021-843x.110.1.40

The interpretations of output results are mainly contributed by
Salvatore S. Mangiafico. (2015). An R Companion for the Handbook of BiologicalStatistics, s, version 1.3.2. rcompanion.org/documents/RCompanionBioStatistics.pdf . (Web version: rcompanion.org/rcompanion/ ).

See Also

trendline, ancovaplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(basicANCOVA)
data("isotope",package = "basicANCOVA")

# (same slope) output ANCOVA results and graphic
ANCOVAplot(x = isotope$d13C, y = isotope$d15N, groups = isotope$area,
           data = isotope, Fig.slope = 1) # (same slope) output ANCOVA results and graphic

# Not run
ANCOVAplot(x = isotope$d13C, y = isotope$d15N, groups = isotope$area,
           data = isotope, Fig.slope = 0) # (different slopes) output "linear regression" results of each group and graphic
# End (Not run)

PhDMeiwp/basicANCOVA documentation built on May 5, 2019, 2:40 a.m.