repDFA | R Documentation |
can be used to determine variables that discriminate in the context of permuted DFA
repDFA(xdata, testfactor, balancefactor, varnames, npercomb = NULL, nrand = 20)
xdata |
a |
testfactor |
character, the name of the column for the test factor (grouping factor) |
balancefactor |
character of length 1 or 2, the factor(s) used for balancing |
varnames |
character vector, column names of the numeric variables to be used for DFA |
npercomb |
the number of cases per level of |
nrand |
numeric, the number of DFAs to be calculated |
information for second function will only be returned if there were at least 2 functions calculated
a data.frame
with information on the first (and if appropriate also second) discriminant function
name of the variable with the highest absolute loading
loading of the variable on the given function (can be either negative or positive)
proportion of variance explained by the function
Christof Neumann
Berthet, M., Neumann, C., Mesbahi, G., Cäsar, C., & Zuberbühler, K. (2018). Contextual encoding in titi monkey alarm call sequences. Behavioral Ecology and Sociobiology, 72(1), 8.
Mundry, R., & Sommer, C. (2007). Discriminant function analysis with nonindependent data: consequences and an alternative. Animal Behaviour, 74(4), 965-976.
balancedataset
data(iris) res <- repDFA(xdata = iris, testfactor = "Species", balancefactor = "Species", varnames = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"), npercomb = 5, nrand = 50) table(res$df1_best) table(res$df2_best)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.