plot_LLIC {LLIC}R Documentation

advanced_plotting_LLIC for LLIC

Description

This function visualizes the results of the LLIC analysis, including a comparison of actual and predicted values, and a bar chart of model coefficients.

Usage

plot_LLIC(X, Y, result)

Arguments

X

Design matrix used in the LLIC analysis.

Y

Random response vector of observed values used in the LLIC analysis.

result

A list containing the results of the Laplace LIC analysis from the LLIC function.

Value

A list containing two 'ggplot' objects:

Actual_vs_Pred

A scatter plot comparing the actual vs predicted values.

Coef

A bar chart displaying the model's coefficients.

Examples


set.seed(12)
library(VGAM)
library(rlang)
library(dplyr)
library(ggplot2)
X <- matrix(data = sample(1:3, 1200 * 5, replace = TRUE), nrow = 1200, ncol = 5)
b <- sample(1:3, 5, replace = TRUE)
e <- rlaplace(1200, 0, 1)
Y <- X %*% b + e
alpha <- 0.05
K <- 10
result <- LLIC(X, Y, alpha, K)
plot_LLIC(X, Y, result)
plots <- plot_LLIC(X, Y, result)
print(plots$Actual_vs_Pred)
print(plots$Coef)


[Package LLIC version 3.0.0 Index]