GABrf2 | R Documentation |
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.
GABrf2(behavior, phaseX, timeX, v1)
behavior |
behavior variable |
phaseX |
phase variable |
timeX |
time variable (e.g., week) |
v1 |
letter of phase being tested in quotation marks (e.g., "A") |
Charles Auerbach, PhD Wurzweiler School of Social Work Wendy Zeitlin, PhD Montclair State University
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.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.