#===================================================
# Loading the library and its dependencies
#===================================================
library("MVR")
#===================================================
# Loading of the Synthetic and Real datasets
# (see description of datasets)
#===================================================
data("Synthetic", "Real", package="MVR")
#===================================================
# Mean-Variance Regularization (Real dataset)
# Multi-Group Assumption
# Assuming unequal variance between groups
# Without cluster usage
#===================================================
nc.min <- 1
nc.max <- 30
probs <- seq(0, 1, 0.01)
n <- 6
GF <- factor(gl(n = 2, k = n/2, len = n),
ordered = FALSE,
labels = c("M", "S"))
mvr.obj <- mvr(data = Real,
block = GF,
log = FALSE,
nc.min = nc.min,
nc.max = nc.max,
probs = probs,
B = 100,
parallel = FALSE,
conf = NULL,
verbose = TRUE)
#===================================================
# Summary Stabilization Diagnostic Plots (Real dataset)
# Multi-Group Assumption
# Assuming unequal variance between groups
#===================================================
stabilization.diagnostic(obj = mvr.obj,
title = "Stabilization Diagnostic Plots
(Real - Multi-Group Assumption)",
span = 0.75,
degree = 2,
family = "gaussian",
device = "PS")
#===================================================
# Mean-Variance Regularization (Real dataset)
# Single-Group Assumption
# Assuming equal variance between groups
# Without cluster usage
#===================================================
nc.min <- 1
nc.max <- 30
probs <- seq(0, 1, 0.01)
n <- 6
mvr.obj <- mvr(data = Real,
block = rep(1,n),
log = FALSE,
nc.min = nc.min,
nc.max = nc.max,
probs = probs,
B = 100,
parallel = FALSE,
conf = NULL,
verbose = TRUE)
#===================================================
# Summary Stabilization Diagnostic Plots (Real dataset)
# Single-Group Assumption
# Assuming equal variance between groups
#===================================================
stabilization.diagnostic(obj = mvr.obj,
title = "Stabilization Diagnostic Plots
(Real - Single-Group Assumption)",
span = 0.75,
degree = 2,
family = "gaussian",
device = NULL)
Run the code above in your browser using DataLab