View source: R/dominanceMatrix.r
dominanceMatrix | R Documentation |
This methods calculates or retrieve dominance matrix
This methods allows a common interface to retrieve all dominance matrices from dominanceAnalysis objects
dominanceMatrix(x, ...)
## S3 method for class 'data.frame'
dominanceMatrix(x, undefined.value = 0.5, ordered = FALSE, ...)
## S3 method for class 'matrix'
dominanceMatrix(x, undefined.value = 0.5, ordered = FALSE, ...)
## S3 method for class 'dominanceAnalysis'
dominanceMatrix(
x,
type,
fit.functions = NULL,
drop = TRUE,
ordered = FALSE,
...
)
x |
matrix (calculate) or dominanceAnalysis (retrieve) |
... |
extra arguments. Not used |
undefined.value |
value when no dominance can be established |
ordered |
Logical. If TRUE, sort the output according to dominance. |
type |
type of dominance matrix to retrieve. Could be complete, conditional or general |
fit.functions |
name of the fit indices to retrieve. If NULL, all fit indices will be retrieved |
drop |
if TRUE and just one fit index is available, returns a matrix. Else, returns a list |
To calculate a dominance matrix from a matrix or dataframe, use
dominanceMatrix(x,undefined.value)
.
To retrieve the dominance matrices from a dominanceAnalysis object, use
dominanceMatrix(x,type,fit.function,drop)
for matrix and data-frame, returns a matrix representing dominance.
1 represents domination of the row variable over the column variable,
0 dominance of the column over the row variable.
Undefined dominance is represented by undefined.value
parameter.
For dominanceAnalysis object, returns a matrix, if drop
parameter
if TRUE and just one index is available. Else, a list is returned, with
keys as name of fit-indices and values as matrices, as described previously.
Other retrieval methods:
averageContribution()
,
contributionByLevel()
,
dominanceBriefing()
,
getFits()
# For matrix or data.frame
mm<-data.frame(a=c(5,3,2),b=c(4,2,1),c=c(5,4,3))
dominanceMatrix(mm)
# For dominanceAnalysis
data(longley)
da.longley<-dominanceAnalysis(lm(Employed~.,longley))
dominanceMatrix(da.longley,type="complete")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.