cluster {SetMethods} | R Documentation |
Diagnostic tool for clustered data.
Description
Function returns pooled, within, and between consistencies for the relationship between two sets, for an object of class "qca", and for a Boolean expression.
Usage
cluster(data=NULL, results, outcome,
unit_id, cluster_id, sol = 1,
necessity = FALSE, wicons = FALSE)
Arguments
data |
A data frame in the long format containing both a colum with the unit names and a column with the cluster names. Column names should be in capital letters. |
results |
An object of class "qca". For performing cluster diagnostics of the sufficient solution for the negated outcome one must only use the |
outcome |
A character string with the name of the outcome in capital letters. When performing cluster
diagnostics of the sufficient solution for the negated outcome one must only use the |
unit_id |
A character string with the name of the vector containing the units (e.g. countries). |
cluster_id |
A character string with the name of the vector containing the clustering units (e.g. years). |
sol |
A vector where the first number indicates the number of the conservative or parsimonious solution according to the order in the "qca" object. For more complicated structures of model ambiguity, the intermediate solution can also be specified by using a character string of the form "c1p3i2" where c = conservative solution, p = parsimonious solution and i = intermediate solution. |
necessity |
Logical. Perform the diagnostic for the relationship of necessity? |
wicons |
Logical. Should within consistencies and coverages be printed? |
Author(s)
Ioana-Elena Oana
References
Garcia-Castro, Roberto, and Miguel A. Arino. 2016. "A General Approach to Panel Data Set-Theoretic Research."" Journal of Advances in Management Sciences & Information Systems 2: 6376.
See Also
Examples
# Import your clustered data in the long format.
# For example:
data(SCHLF)
# Get the intermediate solution:
sol_yi <- minimize(SCHLF, outcome = "EXPORT",
conditions = c("EMP","BARGAIN","UNI","OCCUP","STOCK", "MA"),
incl.cut = .9,
include = "?",
details = TRUE, show.cases = TRUE, dir.exp = c(0,0,0,0,0,0))
# Get pooled, within, and between consistencies for the intermediate solution:
cluster(SCHLF, sol_yi, "EXPORT", unit_id = "COUNTRY",
cluster_id = "YEAR", sol = 1)
# or:
cluster(SCHLF, sol_yi, "EXPORT", unit_id = "COUNTRY",
cluster_id = "YEAR", sol = "c1p1i1")
# Get pooled, within, and between consistencies for EMP as necessary for EXPORT:
cluster(SCHLF, results="EMP", outcome="EXPORT", unit_id = "COUNTRY",
cluster_id = "YEAR", necessity=TRUE)
# or:
cluster(results=SCHLF$EMP, outcome=SCHLF$EXPORT, unit_id = SCHLF$COUNTRY,
cluster_id = SCHLF$YEAR, necessity=TRUE)
# Get pooled, within, and between consistencies for ~EMP as necessary for EXPORT:
cluster(SCHLF, results="~EMP", outcome="EXPORT", unit_id = "COUNTRY",
cluster_id = "YEAR", necessity=TRUE)
# or:
cluster(results=1-SCHLF$EMP, outcome=SCHLF$EXPORT, unit_id = SCHLF$COUNTRY,
cluster_id = SCHLF$YEAR, necessity=TRUE)
# Get pooled, within, and between consistencies for EMP*~MA*STOCK as sufficient for EXPORT:
cluster(SCHLF, "EMP*~MA*STOCK", "EXPORT", unit_id = "COUNTRY",
cluster_id = "YEAR")
# Get pooled, within, and between consistencies for EMP*MA + ~STOCK as sufficient for ~EXPORT:
cluster(SCHLF, "EMP*MA + ~STOCK", "~EXPORT", unit_id = "COUNTRY",
cluster_id = "YEAR")