plot.sparseDFM | R Documentation |
Make plots for the output of sparseDFM(). Options include:
factor
- plot factor estimate series on top of the original standardized stationary data
loading.heatmap
- make a heatmap of the loadings matrix
loading.lineplot
- make a lineplot of variable loadings for a given factor
loading.grouplineplot
- separate variable groups into colours for better visualisation
residual
- boxplot or scatterplot of residuals
lasso.bic
- BIC values for the LASSO tuning parameter
em.convergence
- log-likelihood convergence of EM iterations
## S3 method for class 'sparseDFM'
plot(
x,
type = "factor",
which.factors = 1:(dim(x$state$factors)[2]),
scale.factors = TRUE,
which.series = 1:(dim(x$params$Lambda)[1]),
loading.factor = 1,
series.col = "grey",
factor.col = "black",
factor.lwd = 2,
factor.lab = NULL,
use.series.names = FALSE,
series.lab = NULL,
series.labpos = NULL,
colorkey = TRUE,
col.regions = NULL,
group.names = NULL,
group.cols = NULL,
group.legend = TRUE,
residual.type = "boxplot",
scatter.series = 1,
min.bic.col = "red",
alpha_index = "best",
...
)
x |
an object of class 'sparseDFM'. |
type |
character. The type of plot: |
which.factors |
numeric vector of integers representing which factors should be plotted in |
scale.factors |
logical. Standardize the factor estimates when plotting in |
which.series |
numeric vector of integers representing which series should be plotted in |
loading.factor |
integer. The factor to use in |
series.col |
character. The colour of the background series plotted in |
factor.col |
character. The colour of the factor estimate line in |
factor.lwd |
integer. The line width of the factor estimate line in |
factor.lab |
vector of characters to label each factor in |
use.series.names |
logical. Set to TRUE if plot should display series names in the data matrix X. Default is |
series.lab |
vector of characters to label each data series in |
series.labpos |
numeric vector of integers representing which series are labeled by |
colorkey |
logical. Display the colour key of the heatmap in |
col.regions |
vector of gradually varying colors for |
group.names |
vector of characters of the same dimension as |
group.cols |
vector of characters of the same dimension as the number of different groups in |
group.legend |
logical. Display the legend. Default is |
residual.type |
character. The type of residual plot: |
scatter.series |
integer. The series to plot when |
min.bic.col |
character. Colour for the best |
alpha_index |
Choose which L1 penalty parameter to display the results for. Default is 'best'. Otherwise, input a number between 1:length(alpha_grid) that indicates the required alpha parameter. |
... |
for |
Plots for the output of sparseDFM().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.