Learn R Programming

FARS (version 0.7.1)

plot.mldfm: Plot Method for MLDFM object

Description

Dispatches to specific plot functions for factors, loadings, or residuals.

Usage

# S3 method for mldfm
plot(
  x,
  which = "factors",
  dates = NULL,
  var_names = NULL,
  flip = NULL,
  fpr = FALSE,
  ...
)

Value

No return value. Called for plots generation.

Arguments

x

An object of class mldfm.

which

What to plot: one of "factors" (default), "loadings", or "residuals".

dates

Optional vector of dates (as Date or zoo::yearqtr) to use for the x-axis. If not provided, a simple index (1:N) is used.

var_names

Optional vector of variable names to label loadings and residual axis.

flip

Optional vector of length equal to the number of factors. Set 1 to flip sign for a specific factor (and related loadings); 0 to leave unchanged.

fpr

Logical. If TRUE, uses FPR Gamma (Fresoli, Poncela, Ruiz, 2024); otherwise, uses standard time-varying Gamma.

...

Additional arguments (ignored)