Package 'SSDforR'

Title: Functions to Analyze Single System Data
Description: Functions to visually and statistically analyze single system data.
Authors: Charles Auerbach [aut, cre], Wendy Zeitlin [aut]
Maintainer: Charles Auerbach <[email protected]>
License: GPL (>= 2)
Version: 1.5.37
Built: 2024-12-16 23:36:58 UTC
Source: CRAN

Help Index


Analysis of variance

Description

Computes one-way ANOVA and performs Tukey multiple comparison post-hoc test. Use ANOVA instead of a t-test when comparing more than two phases.

Usage

ABanova(behavior, phaseX)

Arguments

behavior

behavior variable

phaseX

phase variable

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data, 2nd ed. Oxford University Press, 2022. p91, p112-116, p191

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 
1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", 
"B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABanova(cry,pcry)

Draw arrow on graph

Description

This function enables users to draw an arrow on a graph. For example, an arrow can be drawn from a text label of a critical event to a point on the graph.

Usage

ABarrow()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data 2nd ed. Oxford University Press, 2022. p180, p186

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 
1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", 
"B", "B", NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run ABplot(cry,pcry,"week","amount","Crying")
# now run ABarrow()

Autocorrelation at any lag for a phase

Description

This function tests for autocorrelation for any lag. Should be used with samples greater than or equal to six. Also produces significance graph for lags. The Box-Ljung test of significance is performed for all lags up to and including the specified one.

Usage

ABautoacf(behavior, phaseX, v, l)

Arguments

behavior

behavior variable

phaseX

phase variable

v

letter for phase tested (e.g., "A")

l

number of lags (e.g. 1, 2, 3)

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information.

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p42 ,p141

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABautoacf(cry, pcry, "B", 2)

Partial autocorrelation

Description

This function tests for partial autocorrelation for any lag. Should be used with samples greater than or equal to six. Also produces significance graph for lags. The Box-Ljung test of significance is performed for all lags up to and including the specified one.

Usage

ABautopacf(behavior, phaseX, v, lags)

Arguments

behavior

behavior variable

phaseX

phase variable

v

letter for phase being tested (e.g.,"A")

lags

number of lags (e.g., 1, 2, 3)

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABautopacf (cry, pcry,"A", 3)

Binomial test

Description

Binomial test comparing the number of observations of a phase in a desired zone to another phase. User needs to select method for defining a desired zone (e.g., below one SD).

Usage

ABbinomial(phaseX, v1, v2, successA, successB)

Arguments

phaseX

phase variable

v1

letter of first phase (e.g.,"A")

v2

letter of second phase (e.g., "B")

successA

occurrences in desired zone for first phase

successB

occurrences in desired zone for second phase

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p143

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
SD1(cry,pcry,"A","week","amount","Crying")
ABbinomial(pcry,"A","B1", 1, 8)

Descriptive Statistics

Description

This function produces descriptive statistics for all phases. Statistics produced are: mean, 10 percent trimmed mean, median, standard deviation (sd), coefficient of variation (CV), range, interquartile range, and quantiles. Graphical output for this function is a boxplot of data in each phase.

Usage

ABdescrip(behavior, PhaseX)

Arguments

behavior

behavior variable

PhaseX

phase variable

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p32, p44, p49, p98, p109, p134

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# ABdescrip(cry,pcry)

Interquartile band graph through all phases

Description

Builds an iqr band graph through all phases based upon the user's selection of a phase

Usage

ABiqr(behavior, phaseX, v1, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter of phase statistics are based upon in quotation marks

ABxlab

label for x-axis in quotation markes

ABylab

label for y-axis in quotation marks

ABmain

main title in quotation marks

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p133

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# ABiqr(cry,pcry,"week","amount","Crying")

Add dashed line to a graph

Description

Enables the user to draw dashed vertical lines between phases on a graph.

Usage

ABlineD(behavior)

Arguments

behavior

behavior variable

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p96

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run ABplot(cry,pcry,"week","amount","Crying")
# now run ABlineD(cry)

Draw line

Description

This function enables the user to draw solid vertical lines between phases on a graph.

Usage

ABlines(behavior)

Arguments

behavior

behavior variable

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p46, p50, p51, p60, p61, p71, p75, p76, p79, p105, p108, p129

Go to www.ssdanlysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run ABplot(cry,pcry,"week","amount","Crying")
# now run ABlines(cry)

Moving average

Description

Creates moving average transformation using every two observations. A graph is produced and the user is given the option to save the transformed data.

Usage

ABma(behavior, phaseX, v1)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter of phase to be transformed (e.g.,"A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p38-39, p67, p142

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABma(cry, pcry, "A")

Simple line graph

Description

This function builds a simple line graph for a given behavior across all phases. A space separates each phase.

Usage

ABplot(behavior, phaseX, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

ABxlab

label for x-axis between quotation marks

ABylab

label for y-axis between quotation marks

ABmain

main title for graph between quotation marks

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p46, p48,p50, p108,p128

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# ABplot(cry,pcry,"week","amount","Crying")

Multiple line plot

Description

This function should be used to create multiple line charts. This function must be used after the environment is set up using the plotnum() function.

Usage

ABplotm(behavior, phaseX, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

ABxlab

label for x-axis between quotation marks

ABylab

label for y-axis between quotation marks

ABmain

main title for graph between quotation marks

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p108, p129

Go to www.analysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
yell<-c(3, 4, 2, 5, 5, 4, NA, 1, 2, 2, 2, 0, 0)
pyell<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B")
plotnum(2, 1)
ABplotm(cry,pcry,"week","amount","Crying")
ABplotm(yell,pyell,"week","amount","Yelling")

OLS regression to compare phases

Description

Conducts OLS regression comparing any two phases. Coefficients and residuals are produced for each phase. Also a graph with a regression line is displayed for each phase in the graph window.

Usage

ABregres(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

CCharles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p52, p53, p54, p135

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABregres(cry,pcry,"A","B")

Lag-1 autocorrelation (rf2 for small sample size)

Description

This function tests for lag-1 autocorrelation. This should be used any time the sample size is less than six. Any phase can be tested. Also produces regression line graph.

Usage

ABrf2(behavior, phaseX, v1)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter of phase being tested (e.g., "A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Huitema, B.F. & McKean, J.W. (1994). Two reduced-biased autocorrelation estimators: rF1 and rF2. Perceptual and Motor Skills, 78(1), 323-330.

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p18, p37-41, p65, p66, p141

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABrf2(cry, pcry, "B1")

Robust regression

Description

Uses MASS package developed by Brian Ripley <[email protected]> to conduct robust regression comparing any two phases. Coefficients and residuals are produced for each phase. Also a graph with a regression line is displayed for each phase in the graph window.

Usage

ABrobust(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter of first phase in quotation marks (e.g., "A")

v2

letter of second phase in quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p135

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABrobust(cry,pcry,"A","B")

Add statistic line(s)

Description

Add a mean and/or median line to an ABplot.

Usage

ABstat(behavior, phaseX, v, statX)

Arguments

behavior

behavior variable

phaseX

phase variable

v

phase letter in quotation marks (e.g., "A")

statX

statistic in quotation marks (i.e. "mean", "median")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p48, p50, p51, p138

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run this ABplot(cry,pcry,"week","amount","Crying")
# run this statement ABstat(cry, pcry, "A", "median")

Add text to graph

Description

Add text to graphs. Text must appear between quotation marks.

Usage

ABtext(textx)

Arguments

textx

text string must be entered between quotation marks (e.g., "baseline")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p30, p46, p47, p48, p50, p51, p60, p61, p71, p73, p75

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# run this ABplot(cry,pcry,"week","amount","Crying")
# now run ABtext("A")

Time series plot for SSD Data

Description

This function builds a time series chart for a given behavior across all phases. A space separates each phase. There are no connecting dots.

Usage

ABtsplot(behavior, phaseX, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

ABxlab

label for x-axis between quotation marks (e.g., "week")

ABylab

label for y-axis between quotation marks (e.g., "amount")

ABmain

main title graph between quotation mark (e.g., "Crying")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABtsplot(cry,pcry,"week","amount","Crying")

T-test comparing phases

Description

Computes t-test comparing any twp phases selected by user. Bar graph displaying means for each phase is displayed in the graph window.

Usage

ABttest(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter of first phase (e.g., "A")

v2

letter of second phase (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p87, p91, p146-147

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run ABttest(cry,pcry,"A","B")

Wilcoxon rank-sum test between two phases

Description

Performs a two-sample Wilcoxon rank-sum nonparametric test between any two phases.

Usage

ABWilcox(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p147

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABWilcox(cry,pcry,"A","B")

Append data sets with additional data

Description

This function combines data files. This is useful after data are created during transformations when using the diffchart or ABma functions. Once files with different phases are combined, you can use the saved file for significance testing.

Usage

Append()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p67, p91, p143

Go to www.ssdanalysis.com for more information.

Examples

# type Append()

Regression for single phase

Description

Conducts OLS regression for any phase. Coefficients and residuals are produced. Also a simple line graph for the specified phase with a regression line is displayed in the graph window.

Usage

Aregres(behavior, phaseX, v1)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter (e.g., "A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p34, p35-36, p134

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
Aregres(cry,pcry,"A")

Difference for ARIMA

Description

Differencing in any phase. Graphs display both original data and differenced data.

Usage

Arimadiff(behavior, phaseX, v, d)

Arguments

behavior

behavior variable

phaseX

phase variable

v

phase letter in quotation marks (e.g., "A")

d

integer for order of difference

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p142

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
Arimadiff(cry,pcry,"B1",2)

Moving average for ARIMA

Description

Moving average over any period for ARIMA. Uses TTR Package.

Usage

Arimama(behavior, phaseX, v, m)

Arguments

behavior

behavior variable

phaseX

phase variable

v

phase letter in quotation markse (e.g., "A")

m

number of periods to average over (e.g., 2)

Author(s)

CCharles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p142-143

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
Arimama(cry,pcry,"B1",2)

Robust regression for a single phase

Description

Uses MASS package developed by Brian Ripley <[email protected]> to conduct robust regression for a single phase. Coefficients and residuals are produced. Also a graph with a regression line is displayed for the phase in the graph window.

Usage

Arobust(behavior, phaseX, v1)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter (e.g., "A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p143

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
Arobust(cry,pcry,"A")

SPC C-chart

Description

This function builds a C-chart and is used with individual (i.e., ungrouped) data. A space separates each phase. For use when the outcome variable is a count (i.e., ratio-level) variable.

Usage

Cchart(behavior, phaseX, v1, bandX, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter analysis is based upon in quotation marks (e.g., "A")

bandX

number of standard deviations desired (e.g., 2)

ABxlab

label for x-axis between quotation marks (e.g., "weeks")

ABylab

label for y-axis between quotation marks (e.g., "amount")

ABmain

main title between quotation marks (e.g., Crying)

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p77, p140

Bloom, M., Fischer, J. & Orme, J.G. (2009). Evaluating practice: Guidelines for the accountable professional (6th ed.). New York: Pearson.

Orme, J. & Cox, M.E. (2001). Analyzing single-subject design data using statistical proces control charts. Social Work Research, 25(2), 115-127.

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
Cchart(cry,pcry,"A",2,"week","amount","Crying")

Conservative Dual Criteria (CDC) desired zone above lines

Description

The conservative dual-criteria (CDC) is a relatively new approach to comparing phases that works well when data have a moderate lag-1 autocorrelation (lower than 0.6). This function uses two lines to define the desired zone: the mean and the regression line of the comparison phase.

Usage

CDCabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter of first (i.e., comparison) phase between quotation marks (e.g., "A")

v2

phase letter of second phase between quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p85, p143

Fisher, W.W., Kelley, M.E. & Lomas, J.E. (2003). Visual aids and structured criteria for improving visual inspection and interpretation of single-case designs. Journal of Applied Behavior Analysis, 36(3), 387-406.

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
CDCabove(cry,pcry,"A","B")

Conservative Dual Criteria (CDC) desired zone below lines

Description

The conservative dual-criteria (CDC) is a relatively new approach to comparing phases that works well when data have a moderate lag-1 autocorrelation (lower than 0.6). This function uses two lines to define the desired zone: the mean and the regression line of the comparison phase.

Usage

CDCbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter of first (i.e., comparison) phase between quotation marks (e.g., "A")

v2

phase letter of second phase between quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p85, p143

Fisher, W.W., Kelley, M.E. & Lomas, J.E. (2003). Visual aids and structured criteria for improving visual inspection and interpretation of single-case designs. Journal of Applied Behavior Analysis, 36(3), 387-406.

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
CDCbelow(cry,pcry,"A","B")

Difference transformation

Description

Produces first difference transformation on any phase.

Usage

diffchart(behavior, phaseX, v1)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter for phase to be transformed between quotation marks (e.g., "A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p39, p40, p65-66, p90, p142

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
diffchart(cry,pcry,"A")

Effect size

Description

The effect size function automatically displays the percent change and calculated values for both the ES and d-index for any two phases. Information for interpretting calculated values appears in the Console.

Usage

Effectsize(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter between quotation marks (e.g., "A")

v2

second phase letter between quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p56-57, p103, p135

Cohen, J.(1988).Statistical Power analysis for the behavioral sciences (2nd ed). Hillsdale, NJ: Lawrence Erlbaum Associates, Inc.

Glass, G. V., McGaw, B., & Smith, M. L. (1981) Meta-analysis in social research. Thousand Oaks, CA: SAGE Publications, Inc.

Bloom, M., Fischer, J. & Orme, J.G. (2009). Evaluating practice: Guidelines for the accountable professional (6th ed.). New York: Pearson.

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
Effectsize(cry,pcry,"A","B")

Autocorrelation for group data

Description

This function tests for lag-1 autocorrelation for group data. This should be used any time the sample size is less than six. Any phase can be tested. Also produces regression line graph.

Usage

GABrf2(behavior, phaseX, timeX, v1)

Arguments

behavior

behavior variable

phaseX

phase variable

timeX

time variable (e.g., week)

v1

letter of phase being tested in quotation marks (e.g., "A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p99, p101, p147

Huitema, B.F. & McKean, J.W. (1994). Two reduced-biased autocorrelation estimators: rF1 and rF2. Perceptual and Motor Skills, 78(1), 323-330.

Go to www.ssdanalysis.com for more information.

Examples

attend<-c(0,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,0,0,1,1,0,0,1,NA,
0,1,1,0,1,1,0,1,1,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)

week<-c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,NA,6,6,6,6,6,7,7,7,7,7,
8,8,8,8,8,9,9,9,9,9,10,10,10,10,10,11,11,11,11,11,12,12,12,12,12,13,
13,13,13,13,14,14,14,14,14,15,15,15,15,15)

pattend<-c("A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A",
"A","A","A",NA,"B","B","B","B","B","B","B","B","B","B","B","B","B","B","B"
,"B","B","B",
"B","B","B","B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B","B","B","B","B","B","B","B")
# now run: GABrf2(attend,pattend,week,"A")

T-test for group data

Description

Computes t-test for group data. A bar graph showing the mean for each phase is displayed.

Usage

GABttest(behavior, phaseX, timeX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

timeX

time variable (e.g., week)

v1

first phase letter between quotation marks (e.g., "A")

v2

second phase letter between quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p104, p108

Go to www.ssdanalysis.com for more information.

Examples

attend<-c(0,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,0,0,1,1,0,0,1,NA,
0,1,1,0,1,1,0,1,1,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)

week<-c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,NA,6,6,
6,6,6,7,7,7,7,7,
8,8,8,8,8,9,9,9,9,9,10,10,10,10,10,11,11,11,11,11,12,
12,12,12,12,13,
13,13,13,13,14,14,14,14,14,15,15,15,15,15)

pattend<-c("A","A","A","A","A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A","A","A",
"A","A","A",NA,"B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B","B","B","B"
,"B","B","B","B")
# now run GABttest(attend, pattend, week, "A", "B")

Import .csv file

Description

Imports .csv file created in any software package. Uses dialogue box to acquire file. IMPORTANT NOTE: After the file is open type 'attach(ssd)' in the Console and press <RETURN> to manipulate file. Also, can type 'listnames()' to review variable names. Before you open another file type 'detach(ssd)' in the console and press <RETURN>.

Usage

Getcsv()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p22, p29, p44, p66, p90, p91, pp95, p128

Go to www.ssdanalysis.com for more information.

Examples

# type Getcsv()

G-index

Description

The g-index is a measure of effect size calculated using the proportion of scores in the desired zone. Used when there is a trend in the data.

Usage

Gindex(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter between quotation marks (e.g., "A")

v2

second phase letter between quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p57-59

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
Gindex(cry,pcry,"A","B")

Goal Line

Description

Draws a goal line

Usage

Gline()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p22, p29, p44, p66, p90, p91, pp95, p128

Go to www.ssdanalysis.com for more information.

Examples

# type Getcsv()

Median line for group data

Description

Places median line for baseline in group boxplot.

Usage

Gmedian(behavior, phaseX, v)

Arguments

behavior

behavior variable

phaseX

phase variable

v

phase letter for baseline (e.g., "A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p96, p148

Go to www.ssdanalysis.com for more information.

Examples

cohesion<-c(85,90,80,84,82,79,75,76,80,84,75,80,79,83,88,78,80,85,83,
82,89,84,89,91,87,84,77,86,80,
89,81,86,88,83,86,90,86,85,85,87,80,89,NA,86,87,88,89,79,73,75,
74,70,75,81,85,75,73,75,
79,70,72,71,69,70,64,60,59,54,53,55,50,54,51,49,
48,50,46,55,51,55,49,50,48,51,33)

week<-c(1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,5,
5,5,5,5,5,5,6,6,6,6,6,6,6,NA,7,7,7,7,7,7,7,8,8,8,8,8,8,8,9,
9,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,11,12,
12,12,12,12,12,12)

pcohesion<-c("A","A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A",NA,"B","B","B",
"B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B")
ABdescrip(cohesion,week)
Gmedian(cohesion,pcohesion,"A")

insert

Description

Insert function - this function is not in use by SSD for R end-users.

Usage

insert(v, e, pos)

Arguments

v

not used

e

not used

pos

not used

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information.

Examples

# This function is not in use by SSD for R end-users.

Interquartile band graph for one phase

Description

Draws an interquartile band graph for any phase.

Usage

IQRbandgraph(behavior, phaseX, v1, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter for phase for which bands will be drawn (e.g., "A")

ABxlab

label for x-axis in quotation marks (e.g., "weeks")

ABylab

lable for y-axis in quotation marks (e.g., "amount")

ABmain

main title for graph in quotation marks (e.g., "Crying")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p133

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
IQRbandgraph(cry,pcry,"A","week","amount","Crying")

IQR legend

Description

This function creates a legend on an IQR band graph. NOTE: Once this legend is in place, the graph can no longer be altered.

Usage

IQRlegend()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p133

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
IQRbandgraph(cry,pcry,"A","week","amount","Crying")
IQRlegend()

IQR line for ABplot

Description

This function enables a user to add lines representing the interquartile range to any phase of an ABplot.

Usage

IQRline(behavior, phaseX, v)

Arguments

behavior

behavior variable

phaseX

phase variable

v

phase letter upon which IQR stats are based - in quotation marks (e.g., "A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p50, p131

Go www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABplot(cry,pcry,"week","amount","Crying")
# type IQRline(cry, pcry, "A")

Improvement Rate Difference (IRD) calculation

Description

This effect size function will compute the IRD and display a graph in the graph window.The desired improvemment is an increase in the baseline behavior.

Usage

IRDabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p62-65, p136

Bloom, M., Fischer, J. & Orme, J.G. (2009). Evaluating practice: Guidelines for the accountable professional (6th ed.). New York: Pearson.

Parker, R. I., Vannest, K. J., & Brown, L. (2009). The improvement rate difference for single-case research. Exceptional Children, 75(2), 135-150.

Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
IRDabove(esteem,pesteem,"A","B1")

Improvement Rate Difference (IRD) calculation

Description

This effect size function will compute the IRD and display a graph in the graph window. The desired improvemment is a decrease in the baseline behavior.

Usage

IRDbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p62-65, p136

Bloom, M., Fischer, J. & Orme, J.G. (2009). Evaluating practice: Guidelines for the accountable professional (6th ed.). New York: Pearson.

Parker, R. I., Vannest, K. J., & Brown, L. (2009). The improvement rate difference for single-case research. Exceptional Children, 75(2), 135-150. Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
#IQRbandgraph(cry,pcry,"A","week","amount","Crying")
IRDbelow(cry,pcry,"A","B")

List variable names

Description

Lists variable names in active data.

Usage

listnames()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p22, p71, p74, p95, p128

Go to www.ssdanalysis.com for more information.

Examples

# type:  listnames()

Chi-square - desired values above the mean

Description

Chi-square test comparing the frequency of observations above the reference phase mean in any two phases.

Usage

meanabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2,
NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A",
NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
meanabove(cry,pcry,"A","B1")

Chi-square - desired values below the mean

Description

Chi-square test comparing the frequency of observations below the reference phase mean in any two phases.

Usage

meanbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2,
NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A",
NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
meanbelow(cry,pcry,"A","B1")

Mean Effect Size

Description

This function calculates a mean and SD for Cohen's D effect sizes. A file containing saved effect sizes must be opened by Getcvs() and then attached.

Usage

meanES(es, lab,  esmain)

Arguments

es

effect size variable

lab

Label variable

esmain

main title for graph between quotation marks

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p46, p48,p50, p108,p128

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information.

Examples

#need to open a file

Mean Effect Size

Description

This function calculates a mean and SD for a file containing NAP effect sizes A file containing saved effect sizes must be opened by Getcvs() and then attached.

Usage

meanNAP(es, lab,  esmain)

Arguments

es

effect size variable

lab

Label variable

esmain

main title for graph between quotation marks

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p46, p48,p50, p108,p128

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information.

Examples

#need to open a file

Chi-square - desired values above the median

Description

Chi-square test comparing the frequency of observations above the reference phase median in any two phases.

Usage

medabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2,
1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A",
NA, "B", "B", "B", "B", "B", 
"B", NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
medabove(esteem, pesteem,"A","B1")

Chi-square - desired values below the median

Description

Chi-square test comparing the frequency of observations below the reference phase median in any two phases.

Usage

medbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p84, p144

Go to www.ssdanalyis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
medbelow(cry,pcry,"A","B1")

Meta Regression

Description

Meta regression for saved effect sizes in SSDforR. Use the Getcsv() function to open the saved effect size file.

Usage

#metareg(es, v)

Arguments

es

effect size variable

v

variance of effect size

Author(s)

Charles Auerbach, PhD & Wendy Zeitlin, PhD; Yeshiva University, Wurzweiler School of Social Work

References

Go to www.ssdanalysis.com for more information.

Del Re, A. C. (2015). A practical tutorial on conducting meta-analysis in R. The Quantitative Methods for Psychology, 11(1), 37-50.

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014.

Examples

ES<-c(.3, .4, .2, .5, .3, .4)
V<-c(.01, .03, .04, .02, .03, .02) 

metareg(ES,V)

Meta Regression with Moderator

Description

Meta regression for saved effect sizes in SSDforR. Use the Getcsv() function to open the saved effect size file.

Usage

metaregi(es, i, v)

Arguments

es

effect size variable

i

moderator

v

variance of effect size

Author(s)

Charles Auerbach, PhD & Wendy Zeitlin, PhD; Yeshiva University, Wurzweiler School of Social Work

References

Go to www.ssdanalysis.com for more information.

Del Re, A. C. (2015). A practical tutorial on conducting meta-analysis in R. The Quantitative Methods for Psychology, 11(1), 37-50.

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014.

Examples

ES<-c(.3, .4, .2, .5, .3, .4)
V<-c(.01, .03, .04, .02, .03, .02) 
I<-c(1,3,5,4,6,7)
metaregi(ES,I,V)

Non-Overlap of All Pairs (NAP) calculation

Description

This effect size function will compute the NAP. The desired improvemment is an increase in the baseline behavior.

Usage

NAPabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p62-65, p136

Bloom, M., Fischer, J. & Orme, J.G. (2009). Evaluating practice: Guidelines for the accountable professional (6th ed.). New York: Pearson.

Parker, R. I., & Vannest, K. (2009). An improved effect size for single-case research: Nonoverlap of all pairs. Behavior Therapy, 40(4), 357-367.

Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
NAPabove(esteem,pesteem,"A","B1")

Non-Overlap of All Pairs (NAP) calculation

Description

This effect size function will compute the NAP. The desired improvemment is an decreas in the baseline behavior.

Usage

NAPbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p62-65, p136

Bloom, M., Fischer, J. & Orme, J.G. (2009). Evaluating practice: Guidelines for the accountable professional (6th ed.). New York: Pearson.

Parker, R. I., & Vannest, K. (2009). An improved effect size for single-case research: Nonoverlap of all pairs. Behavior Therapy, 40(4), 357-367.

Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
NAPbelow(esteem,pesteem,"A","B1")

PAND - desired values above the reference line

Description

This effect size function evaluates the percentage of all non-overlapping Data (PAND) above the reference line in the comparison phase. Users will be prompted to enter a value for the reference line.

Usage

PANDabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p62 p136

Lenz, A.S. (2012). Calculating effect size in single-case research: A comparison of nonoverlap methods. Measurement and Evaluation in Counseling and Development, 46(1), 64-73.

Parker, R.I. & Hagan-Burker, S. & Vannest, K. (2007). Percentage of all non-overlapping data: An alternative to PND. The Journal of Special Education, 40(4), 194-204.

Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
PANDabove(esteem,pesteem,"A","B1")

PAND - desired values below the reference line

Description

This effect size function evaluates the percentage of all non-overlapping Data (PAND) above the reference line in the comparison phase. Users will be prompted to enter a value for the reference line.

Usage

PANDbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase variable (e.g., "A")

v2

second phase variable (e.g., "B")

Author(s)

Charles Auerbach, PhD & Wendy Zeitlin, PhD; Yeshiva University, Wurzweiler School of Social Work

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p62, p136

Lenz, A.S. (2012). Calculating effect size in single-case research: A comparison of nonoverlap methods. Measurement and Evaluation in Counseling and Development, 46(1), 64-73.

Parker, R.I. & Hagan-Burker, S. & Vannest, K. (2007). Percentage of all non-overlapping data: An alternative to PND. The Journal of Special Education, 40(4), 194-204.

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
PANDbelow(cry,pcry,"A","B1")

PAND legend

Description

Adds a legend to PAND graph. The graph can not be modified in any way after the legend is added.

Usage

PANDlegend()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p136

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
PANDbelow(cry,pcry,"A","B1")
PNDlegend()

SPC P-chart

Description

This function builds a P-chart and can be used when the target behavior has a binary outcome. This chart allows for a comparison of the proportion of tasks completed over time or between phases. A space separates each phase.

Usage

Pchart(behavior, groupX, bandX, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

groupX

grouping variable

bandX

number of standard deviations desired (e.g., 2)

ABxlab

label for x-axis between quotation marks (e.g., "weeks")

ABylab

label for y-axis between quotation marks (e.g., "attendance"")

ABmain

main title for chart between quotation marks (e.g., "Attendance Over Time")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p75, p139-140

Orme, J. & Cox, M.E. (2001). Analyzing single-subject design data using statistical proces control charts. Social Work Research, 25(2), 115-127.

Go to www.ssdanalysis.com for more information.

Examples

attend<-c(0,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,0,0,1,1,0,0,1,NA,
0,1,1,0,1,1,0,1,1,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)

day<-c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,NA,6,6,
6,6,6,7,7,7,7,7,
8,8,8,8,8,9,9,9,9,9,10,10,10,10,10,11,11,11,11,
11,12,12,12,12,12,13,
13,13,13,13,14,14,14,14,14,15,15,15,15,15)
Pchart(attend, day, 2, "week", "amount", "Group attendance")

PEM - desired values above the reference line

Description

Percentage of Data Exceeding the Median (PEM). The PEM procedure offers a method to assess effect size and adjust for the influence of outliers in the baseline phase when desired values are above the reference line.

Usage

PEMabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase variable (e.g., "A")

v2

second phase variable (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p60, p137

Lenz, A.S. (2012). Calculating effect size in single-case research: A comparison of nonoverlap methods. Measurement and Evaluation in Counseling and Development, 46(1), 64-73.

Ma, H-H. (2009). The effectiveness of intervention on the behavior of individuals with autism: A meta-analysis using percentage of data points exceeding the median of baseline phase. Behavior Modification, 33(3), 339-359.

Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
PEMabove(esteem,pesteem,"A","B1")

PEM - desired values below the reference line

Description

Percentage of Data Exceeding the Median (PEM). The PEM procedure offers a method to assess effect size and adjust for the influence of outliers in the baseline phase when desired values are below the reference line.

Usage

PEMbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

irst phase variable (e.g., "A")

v2

second phase variable (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Lenz, A.S. (2012). Calculating effect size in single-case research: A comparison of nonoverlap methods. Measurement and Evaluation in Counseling and Development, 46(1), 64-73.

Ma, H-H. (2009). The effectiveness of intervention on the behavior of individuals with autism: A meta-analysis using percentage of data points exceeding the median of baseline phase. Behavior Modification, 33(3), 339-359.

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
PEMbelow(cry,pcry,"A","B")

PEM legend

Description

Adds a legend to a PEM graph. The graph can not be modified in any way after the legend is added.

Usage

PEMlegend()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
#run first
PEMbelow(cry,pcry,"A","B1") 
#run after complete steps above
PEMlegend()

Set graphic environment

Description

Used prior to ABplotm to set up graphic environment.

Usage

plotnum(nr, nc)

Arguments

nr

number of rows of graphs desired (e.g., 2)

nc

number of columns of graphs desired (e.g., 3)

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p107

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
yell<-c(3, 4, 2, 5, 5, 4, NA, 1, 2, 2, 2, 0, 0)
pyell<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B")
plotnum(2, 1)
ABplotm(cry,pcry,"week","amount","Crying")
ABplotm(yell,pyell,"week","amount","Yelling")

PND - desired values above the reference line

Description

This effect size function evaluates the percentage of non-overlapping data (PND) above highest data point in the comparison phase.

Usage

PNDabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

comparison phase variable (e.g., "A")

v2

letter of second phase (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Lenz, A.S. (2012). Calculating effect size in single-case research: A comparison of nonoverlap methods. Measurement and Evaluation in Counseling and Development, 46(1), 64-73.

Scruggs, T.E. & Mastropieri, M.A. (2012). PND at 25: Past, present, and future trends in summarizing single-subject research. Remedial and Special Education, 34(1), 9-19.

Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
PNDabove(esteem, pesteem,"A","B1")

PND - desired values below the reference line

Description

This effect size function evaluates the percentage of non-overlapping data (PND) below the lowest data point in the comparison phase.

Usage

PNDbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

comparison phase variable (e.g., "A")

v2

second phase variable (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Lenz, A.S. (2012). Calculating effect size in single-case research: A comparison of nonoverlap methods. Measurement and Evaluation in Counseling and Development, 46(1), 64-73.

Scruggs, T.E. & Mastropieri, M.A. (2012). PND at 25: Past, present, and future trends in summarizing single-subject research. Remedial and Special Education, 34(1), 9-19.

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p60, p137

Lenz, A.S. (2012). Calculating effect size in single-case research: A comparison of nonoverlap methods. Measurement and Evaluation in Counseling and Development, 46(1), 64-73.

Parker, R.I. & Hagan-Burker, S. & Vannest, K. (2007). Percentage of all non-overlapping data: An alternative to PND. The Journal of Special Education, 40(4), 194-204.

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
PNDbelow(cry,pcry,"A","B1")

PND legend

Description

Adds a legend to a PND graph. The graph can not be modified in any way after the legend is added.

Usage

PNDlegend()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p62, p136

Parker, R.I. & Hagan-Burker, S. & Vannest, K. (2007). Percentage of all non-overlapping data: An alternative to PND. The Journal of Special Education, 40(4), 194-204.

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
#run first
PNDbelow(cry,pcry,"A","B1") #run after complete steps above
PNDlegend()

SPC R-chart using mean range

Description

The R-Chart is designed to detect changes in variation over time. This is one of two forms of the R-chart and should be used with small samples. This function uses the mean range of samples to track variation.

Usage

Rchart(behavior, groupX, bandX, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

groupX

grouping variables (e.g., day)

bandX

number of standard deviations desired (e.g., 2)

ABxlab

x-axis label in quotation marks (e.g., "weeks")

ABylab

y-axis label in quotation marks (e.g., "amount")

ABmain

main title for graph in quotation marks (e.g., "Problem Range")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p73-74, p136, p106-107, p138-139

Orme, J. & Cox, M.E. (2001). Analyzing single-subject design data using statistical proces control charts. Social Work Research, 25(2), 115-127.

Go to www.ssdanalysis.com for more information.

Examples

admit<-c(85,90,80,84,82,79,75,76,80,84,75,80,79,83,88,78,80,85,83,
82,89,84,89,91,87,84,77,86,80,
89,81,86,88,83,86,90,86,85,85,87,80,89,
NA,86,87,88,89,79,73,75,74,70,75,81,85,75,73,75,
79,70,72,71,69,70,64,60,59,54,53,55,50,54,51,
49,48,50,46,55,51,55,49,50,48,51,33)

day<-c(1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,5,
5,5,5,5,5,5,6,6,6,6,6,6,6,NA,7,7,7,7,7,7,7,8,8,8,8,8,8,8,9,
9,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,
11,12,12,12,12,12,12,12)

padmit<-c("A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A",
NA,"B","B","B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B","B","B")
Rchart(admit, day, 2, "week", "amount", "Admits to Hospital")

SPC R-chart using standard deviation

Description

The R-Chart is designed to detect changes in variation over time. This is one of two forms of the R-chart and should be used with samples larger than ten. This function uses the standard deviation of samples to track variation.

Usage

Rchartsd(behavior, groupX, bandX, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

groupX

grouping variable (e.g., day)

bandX

number of standard deviations desired (e.g., 2)

ABxlab

label for x-axis in quotation marks, (e.g., "day")

ABylab

label for y-axis in quotation marks (e.g., "amount")

ABmain

main title for graph in quotation marks (e.g., "Variation in Admits")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Orme, J. & Cox, M.E. (2001). Analyzing single-subject design data using statistical proces control charts. Social Work Research, 25(2), 115-127.

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p76, p109, p139

Go to www.ssdanalysis.com for more information.

Examples

admit<-c(85,90,80,84,82,79,75,76,80,84,75,80,79,83,88,78,80,85,83,82,89,84,89,91,87,84,77,86,80,
89,81,86,88,83,86,90,86,85,85,87,80,89,NA,86,87,88,89,79,73,75,74,70,75,81,85,75,73,75,
79,70,72,71,69,70,64,60,59,54,53,55,50,54,51,49,48,50,46,55,51,55,49,50,48,51,33)

day<-c(1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,5,
5,5,5,5,5,5,6,6,6,6,6,6,6,NA,7,7,7,7,7,7,7,8,8,8,8,8,8,8,9,
9,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,11,
12,12,12,12,12,12,12)

padmit<-c("A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A","A","A",
"A","A","A","A",
"A","A","A","A","A","A","A","A","A","A",NA,"B",
"B","B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B","B")
Rchartsd(admit, day, 2, "week", "amount", "Admits to Hospital")

Chi-square - desired values above regression line

Description

Chi-square test comparing the frequency of observations above the regression line in a comparison phase to another phase.

Usage

regabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter of comparsion phase in quotation marks (e.g., "A")

v2

letter of second phase in quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p84, p1145-146

Go to www.ssddanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B",
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
regabove(cry,pcry,"A","B1")

Chi-square - desired values below regression line

Description

Chi-square test comparing the frequency of observations below the regression line in a comparison phase to another phase.

Usage

regbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter of comparison phase in quotation marks (e.g., "A")

v2

letter of second phase in quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p83, p146

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
regbelow(cry,pcry,"A","B1")

Draw arrow on graph. For use with Rmarkdown.

Description

This function enables users to draw an arrow on a graph. For example, an arrow can be drawn from a text label of a critical event to a point on the graph. For Use with Rmarkdown.

Usage

RMarrow(X1,Y1,X2,Y2)

Arguments

X1

X1 coordinate

Y1

Y1 coordinate

X2

X2 coordinate

Y2

Y2 coordinate

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p46-p50

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 
1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", 
"B", "B", NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run ABplot(cry,pcry,"week","amount","Crying")
# now run RMarrow(9,10,11,10)

Goal Line for Rmarkdown

Description

Draws a goal line for RMarkdown

Usage

RMGline(y)

Arguments

y

ordinate on y axis / goal level

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p22, p29, p44, p66, p90, p91, pp95, p128

Go to www.ssdanalysis.com for more information.

Examples

# type Getcsv()

Draws line. For use with Rmarkdown

Description

This function enables the user to draw solid vertical lines between phases on a graph. For use with Rmarkdown.

Usage

RMlines(behavior,x)

Arguments

behavior

behavior variable

x

X coordinate

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p46, p50, p51, p60, p61, p71, p75, p76, p79, p105, p108, p129

Go to www.ssdanlysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run ABplot(cry,pcry,"week","amount","Crying")
# now run RMlines(cry,13.5)

Add statistic line(s) for RMarkdown

Description

Add a mean and/or median line to an ABplot for RMarkdown.

Usage

RMstat(behavior, phaseX, v, statX,l)

Arguments

behavior

behavior variable

phaseX

phase variable

v

phase letter in quotation marks (e.g., "A")

statX

statistic in quotation marks (i.e. "mean", "median")

l

x ordinate to start line (e.g., 1)

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p48, p50, p51, p138

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run this ABplot(cry,pcry,"week","amount","Crying")
# run this statement RMstat(cry, pcry, "A", "median",1)

Add text to graph. For use with Rmarkdown

Description

Add text to graphs. Text must appear between quotation marks. For use with Rmarkdown.

Usage

RMtext(textx,x,y)

Arguments

textx

text string must be entered between quotation marks (e.g., "baseline")

x

X coordinate

y

Y coordinate

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p30, p46, p47, p48, p50, p51, p60, p61, p71, p73, p75

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# run this ABplot(cry,pcry,"week","amount","Crying")
# now run RMtext("A",10)

Chi-square - desired values above robust regression line

Description

Chi-square test comparing the frequency of observations above the robust regression line in a comparison phase to another phase.

Usage

robregabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter of comparsion phase in quotation marks (e.g., "A")

v2

letter of second phase in quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p85, p146

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
robregabove(cry,pcry,"A","B1")

Chi-square - desired values below robust regression line

Description

Chi-square test comparing the frequency of observations below the robust regression line in a comparison phase to another phase.

Usage

robregbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter of comparison phase in quotation marks (e.g., "A")

v2

letter of second phase in quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p85, p146

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
robregbelow(cry,pcry,"A","B1")

Robust Conservative Dual Criteria (CDC) using robust regression desired zone above lines

Description

The conservative dual-criteria (CDC) is a relatively new approach to comparing phases that works well when data have a moderate lag-1 autocorrelation (lower than 0.6). This function uses two lines to define the desired zone: the mean and the robust regression line of the comparison phase.

Usage

RobustCDCabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter of first (i.e., comparison) phase between quotation marks (e.g., "A")

v2

phase letter of second phase between quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Fisher, W.W., Kelley, M.E. & Lomas, J.E. (2003). Visual aids and structured criteria for improving visual inspection and interpretation of single-case designs. Journal of Applied Behavior Analysis, 36(3), 387-406.

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p86, p144 Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
RobustCDCabove(cry,pcry,"A","B")

Robust Conservative Dual Criteria (CDC) using robust regression desired zone below lines

Description

The conservative dual-criteria (CDC) is a relatively new approach to comparing phases that works well when data have a moderate lag-1 autocorrelation (lower than 0.6). This function uses two lines to define the desired zone: the mean and the robust regression line of the comparison phase.

Usage

RobustCDCbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter of first (i.e., comparison) phase between quotation marks (e.g., "A")

v2

phase letter of second phase between quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Fisher, W.W., Kelley, M.E. & Lomas, J.E. (2003). Visual aids and structured criteria for improving visual inspection and interpretation of single-case designs. Journal of Applied Behavior Analysis, 36(3), 387-406.

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p86, p144 Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
RobustCDCbelow(cry,pcry,"A","B")

Draw arrow on graph. For use with no interactive.

Description

This function enables users to draw an arrow on a graph. For example, an arrow can be drawn from a text label of a critical event to a point on the graph. For noninteractive use .

Usage

RSarrow(X1,Y1,X2,Y2)

Arguments

X1

X1 coordinate

Y1

Y1 coordinate

X2

X2 coordinate

Y2

Y2 coordinate

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Go to www.ssdanalysis.com for more information

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p46-p50

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 
1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", 
"B", "B", NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run ABplot(cry,pcry,"week","amount","Crying")
# now run RSarrow(9,10,11,10)

Draws line. For use with Rmarkdown

Description

This function enables the user to draw solid vertical lines between phases on a graph. For use nointeractive use.

Usage

RSlines(behavior,x)

Arguments

behavior

behavior variable

x

X coordinate

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p46, p50, p51, p60, p61, p71, p75, p76, p79, p105, p108, p129

Go to www.ssdanlysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run ABplot(cry,pcry,"week","amount","Crying")
# now run RSlines(cry,13.5)

Add statistic line(s) for RMarkdown

Description

Noninteractive add a mean and/or median line to an ABplot.

Usage

RSstat(behavior, phaseX, v, statX,l)

Arguments

behavior

behavior variable

phaseX

phase variable

v

phase letter in quotation marks (e.g., "A")

statX

statistic in quotation marks (i.e. "mean", "median")

l

x ordinate to start line (e.g., 1)

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p48, p50, p51, p138

Auerbach, C. & Schudrich, W. Z. (2013). SSD for R A Comprehensive Statistical Package to Analyze Single-System Data. Research on Social Work Practice, 23(3), 346-353. doi:10.1177/104973153477213

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# now run this ABplot(cry,pcry,"week","amount","Crying")
# run this statement RSstat(cry, pcry, "A", "median",1)

Add non interactive text to graph.

Description

Add text to graphs. Text must appear between quotation marks.

Usage

RStext(textx,x,y)

Arguments

textx

text string must be entered between quotation marks (e.g., "baseline")

x

X coordinate

y

Y coordinate

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p30, p46, p47, p48, p50, p51, p60, p61, p71, p73, p75

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
# run this ABplot(cry,pcry,"week","amount","Crying")
# now run RStext("A",10)

Trimmed mean line added to ABplot

Description

Adds trimmed mean line to ABplot. Click in the phase of the ABplot to add line.

Usage

RSTrimline(behavior, phaseX, v,l)

Arguments

behavior

behavior variable

phaseX

phase variable

v

letter of phase for which trimmed mean is desired in quotation marks (e.g., "A")

l

start point on x axis

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p48, p130-131

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABplot(cry,pcry,"week","amount","Crying")
# now run RSTrimline(cry,pcry,"A",1)

Save data file

Description

Save .csv file edited in SSDforR. Uses dialogue box to save file.

Usage

Savecsv()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p125, p126, p128

Go to www.ssdanalysis.com for more information.

Examples

# type Savecsv()

1-standard deviation band graph

Description

Produces graph for all phases with mean and one standard deviation bands displayed for a comparison phase across all phases. Output in the Console displays the sd, the mean, and values for the sd bands.

Usage

SD1(behavior, phaseX, v1, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter for phase variable stats are base upon in quotation marks (e.g., "A")

ABxlab

x-axis label in quotation marks (e.g., "week")

ABylab

y-axis label in quotation marks (e.g., "amount")

ABmain

main title label in quotation marks (e.g., "Crying")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p51, p79, p132 Go to www.ssdanalysis for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
SD1(cry,pcry,"A","week","amount","Crying")

1-standard deviation band graph for one phase

Description

Produces graph for one phase with mean and one standard deviation bands displayed. Output in the Console displays the sd, the mean, and values for the sd bands.

Usage

sd1bandgraph(behavior, phaseX, v1, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter (e.g., "A")

ABxlab

x-axis label in quotation marks (e.g., "week")

ABylab

y-axis label in quotation marks (e.g., "amount")

ABmain

main title in quotation marks (e.g., "Crying")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p131

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
sd1bandgraph(cry,pcry,"A","week","amount","Crying")

SD1 legend

Description

Adds legend to SD1 band graph. The graph can not be modified in any way after the legend is added.

Usage

SD1legend()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p132

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 
2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", 
NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
SD1(cry,pcry,"A","week","amount","Crying")
SD1legend()

2-standard deviation band graph

Description

Produces graph for all phases with mean and two standard deviation bands displayed for a comparison phase across all phases. Output in the Console displays the sd, the mean, and values for the sd bands.

Usage

SD2(behavior, phaseX, v1, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

letter for phase variable stats are base upon in quotation marks (e.g., "A")

ABxlab

x-axis label in quotation marks (e.g., "week")

ABylab

y-axis label in quotation marks (e.g., "amount")

ABmain

main title in quotation marks (e.g., "Crying")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p32-133

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 
1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA,
"B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
SD2(cry,pcry,"A","week","amount","Crying")

2-standard deviation band graph for one phase

Description

Produces graph for one phase with mean and two standard deviation bands displayed. Output in the Console displays the sd, the mean, and values for the sd bands.

Usage

sd2bandgraph(behavior, phaseX, v1, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter (e.g., "A")

ABxlab

x-axis label in quotation marks (e.g., "week")

ABylab

y-axis label in quotation marks (e.g., "amount")

ABmain

main title in quotation marks (e.g., "Crying")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p34, p132

Go www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 
2, 2, 3, 2, 1, 2, NA,
2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, 
"B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
sd2bandgraph(cry,pcry,"A","week","amount","Crying")

SD2 legend

Description

Adds legend to SD2 band graph. The graph can not be modified in any way after the legend is added.

Usage

SD2legend()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p133

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
SD2(cry,pcry,"A","week","amount","Crying")
SD2legend()

Adds standard deviation bands to an ABplot

Description

Adds standard deviation bands to an ABplot. Click in the phase twice to add upper and lower bands.

Usage

SDAband(behavior, phaseX, v, bandX)

Arguments

behavior

behavior variable

phaseX

phase variable

v

phase band is based upon (e.g., "A")

bandX

number of standard deviations desired (e.g., 2)

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p131

Go to www.ssdnalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABplot(cry,pcry,"week","amount","Crying")
# now run SDAband(cry,pcry,"A",2)

Scientific notation

Description

Converts scientific notation to decimals.

Usage

SN(value)

Arguments

value

value to be converted from scientific notation

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p81, p147

Go to www.ssdanalysis.com for more information.

Examples

SN(2.73e-16)

SPC legend

Description

Adds a legend to any of the SPC charts. The chart can not be modified in any way after the legend is added.

Usage

SPClegend()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p71, p73, p75, p76, p77, p105, p06, p141

Go to www.ssdanalysis.com for more information.

Examples

admit<-c(85,90,80,84,82,79,75,76,80,84,75,80,79,83,88,78,80,85,83,82,89,84,89,
91,87,84,77,86,80,
89,81,86,88,83,86,90,86,85,85,87,80,89,NA,
86,87,88,89,79,73,75,74,70,75,81,85,75,73,75,
79,70,72,71,69,70,64,60,59,54,53,55,50,54,51,49,
48,50,46,55,51,55,49,50,48,51,33)

day<-c(1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,5,
5,5,5,5,5,5,6,6,6,6,6,6,6,NA,7,7,7,7,7,7,7,8,8,8,8,8,8,8,9,
9,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,11,
12,12,12,12,12,12,12)

padmit<-c("A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A","A","A",
"A","A","A","A",
"A","A","A","A","A","A","A","A","A","A",NA,
"B","B","B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B","B","B")
Rchartsd(admit, day, 2, "week", "amount", "Admits to Hospital")
SPClegend()

Draw line on Rchartsd Rchart

Description

This function enables the user to draw solid vertical lines between phases on the SPC R-chart using standard deviation and R-Chart using mean range. The user clicks the mouse on a upper and lower y ordinate.

Usage

SPCline()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p73, p106, p139

Go to www.ssdanlysis.com for more information.

Examples

admit<-c(85,90,80,84,82,79,75,76,80,84,75,80,79,83,88,78,80,85,83,82,
89,84,89,91,87,84,77,86,80,
89,81,86,88,83,86,90,86,85,85,87,80,89,NA,86,87,88,89,
79,73,75,74,70,75,81,85,75,73,75,
79,70,72,71,69,70,64,60,59,54,53,55,50,54,51,49,48,50,46,55,51,55,49,50,48,51,33)

day<-c(1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,5,
5,5,5,5,5,5,6,6,6,6,6,6,6,NA,7,7,7,7,7,7,7,8,8,8,8,8,8,8,9,
9,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,11,12,
12,12,12,12,12,12)

padmit<-c("A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A",NA,"B","B",
"B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B","B")
Rchart(admit, day, 2, "week", "amount", "Admits to Hospital")
# now run SPCline()

List of all functions in SSD for R

Description

Lists all the functions available in the SSD for R package.

Usage

SSDforR()

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p18

Go to www.ssdanalysis.com for more information.

Examples

SSDforR()

TAU_U - Calculates Tau U index increase is desired

Description

This Calculates the Tau-U index Parker, Vannest, Davis, & Sauber 2011.

Usage

TauUabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Parker, Vannest, Davis, & Sauber 2011 Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
TauUabove(esteem,pesteem,"A","B1")

TAU_U - Calculates Tau U index decrease is desired

Description

This Calculates the Tau-U index Parker, Vannest, Davis, & Sauber 2011.

Usage

TauUbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter (e.g., "A")

v2

second phase letter (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Parker, Vannest, Davis, & Sauber 2011 Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
TauUbelow(esteem,pesteem,"A","B1")

Tau Trend test and Sen's slope test for single phase

Description

Conducts a Mann-Kendall trend test for any phase.

Usage

trendtest(behavior, phaseX, v1)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase letter (e.g., "A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p34, p35-36, p134

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
trendtest(cry,pcry,"A")

Chi-square - desired values above the trimmed mean

Description

Chi-square test comparing the frequency of observations above the reference phase trimmed mean in any two phases.

Usage

trimabove(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter in quotation marks (e.g., "A")

v2

second phase letter in quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p84, p145

Go to www.ssdanalysis.com for more information.

Examples

esteem<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pesteem<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
trimabove(esteem, pesteem,"A","B1")

Chi-square - desired values below the trimmed mean

Description

Chi-square test comparing the frequency of observations below the reference phase trimmed mean in any two phases.

Usage

trimbelow(behavior, phaseX, v1, v2)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

first phase letter in quotation marks (e.g., "A")

v2

second phase letter in quotation marks (e.g., "B")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p84, p145

Go to www.ssdanalysis.com for more information

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", 
NA, "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
trimbelow(cry,pcry,"A","B")

Trimmed mean line added to ABplot

Description

Adds trimmed mean line to ABplot. Click in the phase of the ABplot to add line.

Usage

Trimline(behavior, phaseX, v)

Arguments

behavior

behavior variable

phaseX

phase variable

v

letter of phase for which trimmed mean is desired in quotation marks (e.g., "A")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p48, p130-131

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA,
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
ABplot(cry,pcry,"week","amount","Crying")
# now run Trimline(cry,pcry,"A")

SPC XMR-chart

Description

The X-mR-chart can be use to detect changes within and between phases. Can be used with individual data, but it is not appropriate for group data.

Usage

Xmrchart(behavior, phaseX, v1, bandX, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

phaseX

phase variable

v1

phase bands are based upon in quotation marks (e.g., "A")

bandX

number of standard deviations desired (e.g., 2)

ABxlab

x-axis label in quotation marks (e.g., "week")

ABylab

y-axis label in quotation marks (e.g., "amount")

ABmain

main title for chart in quotation marks (e.g., "X-mR-Chart")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Bloom, M., Fischer, J. & Orme, J.G. (2009). Evaluating practice: Guidelines for the accountable professional (6th ed.). New York: Pearson.

Orme, J. & Cox, M.E. (2001). Analyzing single-subject design data using statistical proces control charts. Social Work Research, 25(2), 115-127.

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. P75-76

Go to www.ssdanalysis.com for more information.

Examples

cry<-c(3, 4, 2, 5, 3, 4, NA, 2, 2, 3, 2, 1, 2, NA, 2, 2, 1, 2, 1, 0, 0, 0)
pcry<-c("A", "A", "A", "A", "A", "A", NA, "B", "B", "B", "B", "B", "B", NA, 
"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1")
Xmrchart(cry, pcry, "A", 2, "week", "amount", "X-mR-Chart")

SPC XR-Chart

Description

This chart can be used when there are multiple observations per sample and uses the mean of each sample to create the chart.

Usage

XRchart(behavior, groupX, bandX, ABxlab, ABylab, ABmain)

Arguments

behavior

behavior variable

groupX

grouping variable

bandX

number of standard deviations desired (e.g., 2)

ABxlab

x-axis label in quotation marks (e.g., "week")

ABylab

y-axis label in quotation marks (e.g., "mean amount")

ABmain

main title for chart in quotation marks (e.g., "Admits to Hospital")

Author(s)

Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University

References

Auerbach, Charles, and Zeitlin Wendy. SSD for R: An R Package for Analyzing Single-Subject Data. Oxford University Press, 2014. p71, p105

Orme, J. & Cox, M.E. (2001). Analyzing single-subject design data using statistical proces control charts. Social Work Research, 25(2), 115-127.

Go to www.ssdanalysis.com for more information.

Examples

admit<-c(85,90,80,84,82,79,75,76,80,84,75,80,79,83,88,78,80,85,83,
82,89,84,89,91,87,84,77,86,80,
89,81,86,88,83,86,90,86,85,85,87,80,89,NA,86,87,88,89,79,73,75,
74,70,75,81,85,75,73,75,
79,70,72,71,69,70,64,60,59,54,53,55,50,54,51,49,48,50,46,55,51,
55,49,50,48,51,33)

day<-c(1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,5,
5,5,5,5,5,5,6,6,6,6,6,6,6,NA,7,7,7,7,7,7,7,8,8,8,8,8,8,8,9,
9,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,11,12,
12,12,12,12,12,12)

padmit<-c("A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A",
"A","A","A","A","A","A","A","A","A","A",NA,"B","B",
"B","B","B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B",
"B","B","B","B","B","B","B","B","B","B","B","B",
"B","B","B","B","B","B")
XRchart(admit, day, 2, "week", "amount", "Admits to Hospital")