Learn R Programming

SetMethods (version 4.0)

cluster.plot: Function for plotting pooled, between, and within consistencies for a cluster diagnostics.

Description

Function for plotting pooled, between, and within consistencies for a cluster diagnostics. For a sufficient solution, the function returns plots for the entire solution and each sufficient term.

Usage

cluster.plot(cluster.res,
           labs = TRUE,
           size = 5,
           angle = 0,
           wicons = FALSE,
           wiconslabs = FALSE,
           wiconssize = 5,
           wiconsangle = 90)

Arguments

cluster.res

An object of class "cluster.res". This is the result of a cluster diagnostics obtained with the cluster() function.

labs

Logical. Should labels for the clusters be printed?

size

Label font size for the clusters.

angle

Label rotation for the clusters.

wicons

Logical. Should within consistency plots be returned?

wiconslabs

Logical. Should labels for the units be printed?

wiconssize

Label font size for the units.

wiconsangle

Label rotation for the units.

Author

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.

Examples

Run this code
# Load the data:
data(PAYF)

# Create a sufficient solution using minimize:
PS <- minimize(data = PAYF,
                        outcome  = "HL",
                        conditions = c("HE","GG","AH","HI","HW"),
                        incl.cut = 0.9,
                        n.cut = 2,
                        include = "?",
                        details = TRUE, 
                        show.cases = TRUE)
PS

# Perform cluster diagnostics:

CB <- cluster(data = PAYF,
           results = PS,
           outcome = "HL",
           unit_id = "COUNTRY",
           cluster_id = "REGION",
           necessity=FALSE,
           wicons = FALSE)
CB

# Plot pooled, between, and within consistencies:

cluster.plot(cluster.res = CB,
             labs = TRUE,
             size = 8,
             angle = 6,
             wicons = TRUE)

Run the code above in your browser using DataLab