plot.ClusterVAR {ClusterVAR}R Documentation

Visualizing Model fit and information criteria

Description

Creates a variety of plots summarizing fitted LCVAR models.

Usage

## S3 method for class 'ClusterVAR'
plot(x,
    show,
    Number_of_Clusters = NULL,
    Number_of_Lags = NULL,
    Model = NULL,
    ...)

Arguments

x

An output object of the ClusterVAR function

show

Indicate summaries to plot. show = "GNC" compares models with different lags for a given number of clusters, specified with Number_of_Clusters. show = "GNL" compares models with different number of clusters, given the a number of lags specified with Number_of_Lags.

Alternatively, the VAR matrices of a specific model can be visualized. show = specific visualizes the VAR matrices across clusters for a given model which is specified with the argument Model. show = specificDiff displays the pairwise differences between clusters for a specific model, also specified with the argument Model. show = specific and show = specificDiff are currently only implemented for models with 1 lag.

Number_of_Clusters

An integer. Specify the fixed number of clusters when using show = "GNC". Defaults to Number_of_Clusters = NULL

Number_of_Lags

An integer. Specify the fixed number of lags when using show = "GNL". Defaults to Number_of_Lags = the lowest number of lags specified in object.

Model

An integer vector. Specify when using show = "specific" or show = specificDef. Indicates the model for which coefficients should be plotted. For example, Model = c(1,1,1) plots a model with three clusters and each cluster has 1 lag. Defaults to Model = NULL.

...

Pass additional arguments.

Details

Creates different plots showing either a fitted LCVAR model or fit indices for a specified set of LCVAR models.

Value

No return value, just plots figure.

Author(s)

Anja Ernst & Jonas Haslbeck

Examples


LCVAR_outExample <- LCVAR(Data = ExampleData,
                          yVars = 1:4, ID = 5, Beep = 6,
                          xContinuous = 7, xFactor = 8,
                          Clusters = 1:2, Lags = 1:2,
                          Center = FALSE, Cores = 2,
                          RndSeed = 3, Rand = 2,
                          it = 25)

plot(LCVAR_outExample, show = "GNL", Number_of_Lags = 1)
plot(LCVAR_outExample, show = "GNC", Number_of_Clusters = 2)
plot(LCVAR_outExample, show = "specific", Model = c(1, 1))
plot(LCVAR_outExample, show = "specific", Model = c(1, 1), labels = c("A", "B", "C","D"))
plot(LCVAR_outExample, show = "specificDiff", Model = c(1, 1))


[Package ClusterVAR version 0.0.7 Index]