Plot Factor Merger

# S3 method for factorMerger
plot(x, panel = "all", statistic = "loglikelihood",
  nodesSpacing = "equidistant", colorClusters = TRUE,
  splitStatistic = "GIC", splitThreshold = NULL, penalty = 2,
  showSplit = FALSE, showSignificance = TRUE,
  title = "Factor Merger Tree", subtitle = " ", palette = NULL,
  responsePanel = NULL, responsePanelPalette = NULL, gicPanelColor = NULL,
  panelGrid = TRUE, chisqQuantile = 0.05, ...)

Arguments

x

object of a class factorMerger.

panel

Type of panels to be plot. Possible values are c("all", "response", "GIC", "tree"). All types of plots include the Factor Merger Tree. Apart from the Factor Merger Tree there are also two possible panels: the Response Plot (response summary, specific to the model family), the GIC Plot (GIC vs. loglikelihood/p-value).

  • "all" plots all panels and a short summary of the full model,

  • "response" plots the Factor Merger Tree and the Response Plot,

  • "GIC" plots the Factor Merger Tree and the GIC Plot,

  • "tree" plots the Factor Merger Tree only.

statistic

Statistic to be displayed on the OX axis of the Factor Merger Tree. Possible values are c("loglikelihood", "p-value"). If "p-value" is chosen p-value for the Likelihood Ratio Test against the full model is plot on the OX axis.

nodesSpacing

Type of vertical nodes spacing in the Factor Merger Tree). May be chosen from c("equidistant", "effects", "modelSpecific"). "effects" arranges nodes according to the model coefficients estimatiors (e.g. in Gaussian case on the OY axis group means are plotted).

# TODO: Implement "modelSpecific".

colorClusters

Boolean. If TRUE, the default, the Factor Merger Tree is colored according to the optimal factor split (defined by splitStatistic and splitThreshold or splitStatistic and penalty).

splitStatistic

Statistic used in the optimal split definition. Possible values are: c("GIC", "loglikelihood", "p-value"). If "GIC" is chosen, factor is split to minimize GIC with the penalty penalty. Otherwise, chooses the very last partition whose corresponding statistic (model loglikelihood or p-value for the LRT test) is not lower than splitThreshold.

splitThreshold

Threshold used in the optimal split definition. Used only with splitStatistic = c("loglikelihood", "p-value").

penalty

GIC penalty used for defining the optimal partition with splitStatistic = "GIC". The same penalty is used in the GIC plot.

showSplit

Boolean. If TRUE plots vertical line crossing the optimal split.

showSignificance

Boolean. If TRUE, the default, marks partitions that are significantly worse than their predecessors on the Factor Merger Tree (uses the Likelihood Ratio Test).

Significance codes are: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1.

title

Factor Merger Tree plot's title.

subtitle

Factor Merger Tree plot's subtitle.

palette

Color palette used in the Factor Merger Tree and the Response Plot.

responsePanel

Response panel type -- accepts the following values dependent on the model family:

  • multi dimensional Gaussian: c("heatmap", "profile"),

  • single dimensional Gaussian: c("means", "boxplot","tukey"),

  • binomial: c("proportion"),

  • survival: c("survival")

responsePanelPalette

Additional color palette used in the Response Plot if palettes for the Factor Merger Tree and the Response Plot are to be different.

gicPanelColor

Color used in the GIC plot.

panelGrid

Boolean. If TRUE, each interval on the OX axis of the Factor Merger Tree corresponds to the 1 - chisqQuantile quantile of chi-square distribution. Otherwise, panel is blank.

chisqQuantile

Significance level used if panelGrid = TRUE.

...

Other arguments