Description Usage Arguments Examples
This function takes a standard data set and converts it into a form ready for POSAC analysis. The output of the function will be a data frame with one more column that the input data. The final column will be called "freq" and will hold the number of cases with the given pattern.
1 |
data |
A data frame with each row representing an inidividual and columns representing the variable which make up the patterns of interest. |
1 2 3 4 5 6 | d1=data.frame(x1=c(1,1,1,2,2,2,3,3,3)
,x2=c(1,2,1,1,1,2,2,3,3)
,x3=c(1,2,2,2,2,3,3,3,3))
pats=DataToPatterns(d1)
pats
POSAC(pats[,1:3],pats[,4])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.