Learn R Programming

SCRT (version 1.3.1)

observed: Observed test statistic

Description

The observed test statistic is calculated from the obtained raw data.

Usage

observed(design, statistic, data = read.table(file.choose(new = FALSE)))

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

statistic

Test statistic. For alternation designs, multiple-baseline designs and AB phase designs, there are 3 built-in possibilities: "A-B", "B-A", and "|A-B|", which stand for the (absolute value of the) difference between condition means. For phase designs with more than 2 phases, 3 more built-in options are available: "PA-PB", "PB-PA", and "|PA-PB|" refer to the (absolute value of the) difference between the means of phase means. Additionally, it is possible to specify a custom test statistic using the variable identifiers "A" and "B" (or in the case of phase deisgns with more than 2 phases, "A1", "B1", "A2", "B2", "A" and "B") and any of the basic R functions. For example, "abs(mean(A) - mean(B))" can be used as a test statistic and it will be the same as using "|A-B|".

data

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

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.

References

Bulte, I., & Onghena, P. (2008). An R package for single-case randomization tests. Behavior Research Methods, 40, 467-478.

Bulte, I., & Onghena, P. (2009). Randomization tests for multiple baseline designs: An extension of the SCRT-R package. Behavior Research Methods, 41, 477-485.

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

See Also

distribution.systematic to generate the exhaustive randomization distribtion and pvalue.systematic to obtain the corresponding p-value.

distribution.random to generate the nonexhaustive randomization distribution and pvalue.random to obtain the corresponding p-value.

Examples

Run this code
# NOT RUN {
data(ABAB)
observed(design = "ABAB", statistic = "PA-PB", data = ABAB)
# }

Run the code above in your browser using DataLab