predict {QuantRegGLasso}R Documentation

Predict Top-k Coefficient Functions

Description

Predict the top-k coefficient functions based on a qrglasso class object.

Usage

predict(
  qrglasso_object,
  metric_type = "BIC",
  top_k = 5,
  degree = 2,
  boundaries = c(0, 1),
  is_approx = FALSE
)

Arguments

qrglasso_object

A qrglasso class object.

metric_type

Character. Metric type for gamma selection, e.g., BIC, BIC-log. Default is BIC.

top_k

Integer. The number of top estimated functions to predict. Default is 5.

degree

Integer. Degree of the piecewise polynomial. Default is 2.

boundaries

Array. Two boundary points for the piecewise polynomial. Default is c(0, 1).

is_approx

Logical. If TRUE, the size of covariate indexes will be 1e6; otherwise, 1e4. Default is FALSE.

Value

A list containing:

coef_functions

Matrix. The estimated top-k coefficient functions with dimension (m \times k), where m is the size of z.

z

Array. Index predictors used in the generation.

See Also

qrglasso

Examples

set.seed(123)
n <- 100
p <- 5
L <- 5
Y <- matrix(rnorm(n), n, 1)
W <- matrix(rnorm(n * p * (L - 1)), n, p * (L - 1))

# Call qrglasso with default parameters
result <- qrglasso(Y = Y, W = W, p = p)
estimate <- predict(result) 
print(dim(estimate$coef_functions))


[Package QuantRegGLasso version 1.0.0 Index]