Title: Likelihood Criterion (LIC) Analysis for Laplace Regression Model
Version: 3.0.0
Date: 2024-11-23
Description: Performs likelihood criterion analysis using the Laplace regression model to determine its optimal subset of variables. The methodology is based on Guo et al. (2023), LIC criterion for optimal subset selection in distributed interval estimation <doi:10.1080/02331888.2020.1823979>.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.2
Imports: stats, VGAM, dplyr, LaplacesDemon, relliptical, ggplot2, rlang
NeedsCompilation: no
Packaged: 2024-11-23 10:48:14 UTC; Lenovo
Author: Guangbao Guo [aut, cre], Yaxuan Wang [aut]
Maintainer: Guangbao Guo <ggb11111111@163.com>
Depends: R (≥ 3.5.0)
Repository: CRAN
Date/Publication: 2024-11-28 12:00:02 UTC

LLIC for Lre Model

Description

This function carries out an Laplace LIC analysis utilizing the Lre model.

Usage

LLIC(X, y, alpha, K)

Arguments

X

Design matrix

y

Random response vector of observed values

alpha

Significance level

K

Number of subsets

Value

A list containing the following components:

MUopt

A vector of the means of the predictor variables in the optimal subset.

Bopt

A vector of the estimated regression coefficients from the final model fitted to the optimal subset.

MAEMUopt

The Mean Absolute Error (MAE) for the optimal subset.

MSEMUopt

The Mean Squared Error (MSE) for the optimal subset.

opt

Currently NULL, a placeholder for potential future use.

Yopt

A vector of the predicted values from the final model fitted to the optimal subset.

Examples

set.seed(12)
library(VGAM)
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)
MUopt <- result$MUopt
Bopt <- result$Bopt
MAEMUopt <- result$MAEMUopt
MSEMUopt <- result$MSEMUopt
opt <- result$opt
Yopt <- result$Yopt


Data Processing for LLIC Analysis

Description

This function processes the data generated for the LLIC analysis, including filtering, mutation, and selection of specific columns.

Usage

data_pc(data)

Arguments

data

A data frame containing the raw data generated for the LLIC analysis.

Value

A data frame with the following columns:

X1

The filtered values of the original 'X1' column, keeping only rows where 'X1 <= 2'.

X2

The original 'X2' column.

X1_squared

A new column containing the square of the 'X1' values.

Examples

set.seed(12)
library(dplyr)
library(VGAM)
raw_data <- data.frame(
  X1 = sample(1:3, 1200, replace = TRUE),
  X2 = sample(1:3, 1200, replace = TRUE),
  X3 = sample(1:3, 1200, replace = TRUE),
  X4 = sample(1:3, 1200, replace = TRUE),
  X5 = sample(1:3, 1200, replace = TRUE),
  Y = rlaplace(1200, 0, 1)
)
processed_data <- data_pc(raw_data)


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)

mirror server hosted at Truenetwork, Russian Federation.