# NOT RUN {
# data is a one-column dataframe of code sequences
sequential(data_sequential, permtest = TRUE, nperms = 100)
# in this case, data is the frequency transition matrix from
# Griffin, W. A., & Gottman, J. M. (1990). Statistical methods for analyzing family
# interaction. In G. R. Patterson (Ed.), Family social interaction: Content and methodology
# issues in the study of aggression and depression (p. 137). Hillsdale, NJ: Erlbaum.
freqs <- t(matrix(c(
0, 0, 0, 0, 2, 2,
0,10, 5, 5,60,20,
0, 9, 2, 1, 3, 0,
0, 3, 0, 1, 5, 0,
3,54, 6, 2,24, 8,
1,24, 2, 1, 3, 12 ), 6, 6) )
sequential(freqs, adjacent = 1,
labels = c('H+','Ho','H-','W+','Wo','W-'))
# Data from p 159 of Bakeman & Quera (2011), Sequential Analysis and Observational
# Methods for the Behavioral Sciences. Cambridge University Press.
data_BQ2011 <- t(matrix(c(
2,1,4,3,3,4,3,4,2,1,4,4,5,4,1,3,4,5,3,2,2,1,4,1,2,
5,2,1,2,3,3,1,4,4,1,4,1,3,3,3,1,5,2,1,1,3,1,4,1,2,
3,3,4,5,5,2,3,3,5,2,5,4,4,2,3,1,5,5,2,2,1,3,3,3,3 )) )
sequential(data_BQ2011, labels=c('Chat','Write','Read','Ask','Attentive'),
permtest = TRUE, nperms = 1000, tailed = 1)
# }
Run the code above in your browser using DataLab