graph.VAR: Plot an estimate of variability

Description Usage Arguments Details Note References See Also Examples

View source: R/graph.VAR.R

Description

Information about variability in the data is displayed by three methods. Range bar graphs consist of a vertical line for each phase, created by connecting three points: an estimate of central tendency ((trimmed) mean, (broadened) median, M-estimator), the minimum and the maximum. Range lines consist of a pair of lines parallel to the X-axis, passing through the lowest and highest values for each phase, and superimposed on the raw data. Trended ranges display changes in variability within phases. For all these methods, the influence of outliers may be lessend by using a trimmed range, in which only a sample of the data set is used.

Usage

1
2
3
graph.VAR(design, VAR, dataset = "regular", CL, tr, 
data = read.table(file.choose(new = FALSE)), xlab = NULL, ylab = NULL, 
ylim = NULL, legendxy = NULL, labels = c("A", "B", "A", "B"))

Arguments

design

Type of single-case design: "AB", "ABA", "ABAB", "CRD"(completely randomized design), "RBD" (randomized block design), "ATD" (alternating treatments design), "MBD" (multiple-baseline AB design) or "Custom" (user specified design).

VAR

Estimate of variability: range bar graph ("RB"), range lines ("RL"), or trended range ("TR").

dataset

Use the whole dataset ("regular") or reduce the influence of outliers by removing the 10-20 percent extreme values from each phase ("trimmed"). Default: the whole dataset is used.

CL

Measure of central tendency: "mean", "median", "bmed" (broadened median), "trimmean" (trimmed mean), or "mest" (M-estimator of location).

tr

If CL="trimmean": the percentage of observations that has to be removed from the end of the distribution before computing the mean. It can be any value from 0 (regular arithmetic mean) to 0.5. Usually 20 percent of the observations is trimmed (so tr=0.2). If CL="mest": the desired value for the constant K. Usually a percentile of the standard normal distribution is chosen. Wilcox (2005) suggests using K=1.28, which corresponds to the 90th percentile of the standard normal distribution and covers 80 percent of the underlying distribution.

data

File in which the data can be found. Default: a window pops up in which the file can be selected.

xlab

Label x axis.

ylab

Label y axis.

ylim

Y axis limits in the form c(min, max).

legendxy

Optional legend location x and y coordinates in the form c(x coordinate, y coordinate). Only used when design is "CRD", "RBD", "ATD" or "Custom".

labels

Optional labels for treatment levels in the form c("A", "B").

Details

When using the default data argument, a window will pop up to ask in what file the data can be found. This text file containing the data should consist of two columns for single-case phase and alternation designs: the first with the condition labels and the second with the obtained scores. For multiple-baseline designs it should consist of these two columns for EACH unit. This way, each row represents one measurement occasion. It is important not to label the rows or columns.

Missing data should be indicated as NA. For calculations, missing data are omitted. Please note that some of the complicated plots may not work if there is missing data.

For alternation designs, after the plot is drawn, the location of the legend should be indicated by a left mouse click.

Note

For the calculation of the M-estimator of location, the function mest(x,bend=1.28) from Wilcox (2005) is used.

Wilcox, R.R. (2005). Introduction to robust estimation and hypothesis testing (2nd ed.). San Diego, CA: Elsevier Academic Press.

References

Bulte, I., & Onghena, P. (2012). When the truth hits you between the eyes: A software tool for the visual analysis of single-case experimental data. Methodology, 8, 104-114.

http://ppw.kuleuven.be/home/english/research/mesrg

See Also

graph to simply plot raw single-case data.

graph.CL to plot a measure of central tendency as a line parallel to the abscissa.

graph.TREND to display a possible trend in the data.

graphly to display an interactive plot.

Examples

1
2
3
4
5
data(AB)
graph.VAR(design = "AB", VAR = "RB", CL = "mean", data = AB)
graph.VAR(design = "AB", VAR = "RL", data = AB)
graph.VAR(design = "AB", VAR = "TR", data = AB)
graph.VAR(design = "AB", VAR = "RL", dataset = "trimmed", data = AB)

Example output



SCVA documentation built on Jan. 10, 2020, 1:06 a.m.