GABttest | R Documentation |
Computes t-test for group data. A bar graph showing the mean for each phase is displayed.
GABttest(behavior, phaseX, timeX, v1, v2)
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") |
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. p104, p108
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 GABttest(attend, pattend, week, "A", "B")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.