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 data.frame
dominanceMatrix(x, undefined.value = 0.5, ordered = FALSE, ...)
# S3 method for matrix
dominanceMatrix(x, undefined.value = 0.5, ordered = FALSE, ...)
# S3 method for dominanceAnalysis
dominanceMatrix(
x,
type,
fit.functions = NULL,
drop = TRUE,
ordered = FALSE,
...
)
matrix (calculate) or dominanceAnalysis (retrieve)
extra arguments. Not used
value when no dominance can be established
Logical. If TRUE, sort the output according to dominance.
type of dominance matrix to retrieve. Could be complete, conditional or general
name of the fit indices to retrieve. If NULL, all fit indices will be retrieved
if TRUE and just one fit index is available, returns a matrix. Else, returns a list
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.
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)
Other retrieval methods:
averageContribution()
,
contributionByLevel()
,
dominanceBriefing()
,
getFits()
# NOT RUN {
# 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")
# }
Run the code above in your browser using DataLab