Learn R Programming

SFPL (version 1.0.0)

sfpl_select: Model selection for SFPL

Description

This function selects the "best" fitted SFPL model using either the AIC or the BIC, see Hermes et al., (2024).

Usage

sfpl_select(beta_est, x, y, ls_vec, lf_vec)

Value

model_aic

A \(p \times K\) matrix containing the parameter estimates using the penalty parameters \(\lambda_s, \lambda_f\) as chosen by the AIC.

model_bic

A \(p \times K\) matrix containing the parameter estimates using the penalty parameters \(\lambda_s, \lambda_f\) as chosen by the BIC.

Arguments

beta_est

A list of length ls_vec\(\times\)lf_vec that contains the parameter estimates \(\hat{beta}\), using either sfpl or sfpl_approx, for each combination of ls_vec and lf_vec.

x

A \(M \times p\) matrix containing the values for the \(p\) objects variables across the \(M\) objects.

y

A list consisting of \(K\) matrices with each matrix containing (partial) rankings across \(n\) observations for group \(k\).

ls_vec

Vector containing shrinkage parameters.

lf_vec

Vector containing fusion penalty parameters.

Author

Sjoerd Hermes
Maintainer: Sjoerd Hermes sjoerd.hermes@wur.nl

References

1. Hermes, S., van Heerwaarden, J., and Behrouzi, P. (2024). Joint Learning from Heterogeneous Rank Data. arXiv preprint, arXiv:2407.10846

Examples

Run this code
# \donttest{
# we first obtain the rankings and object variables
data(ghana)
y <- list(ghana[[1]], ghana[[2]])
x <- ghana[[3]]

# our next step consists of creating two vectors for the penalty parameters
ls_vec <- lf_vec <- c(0, 0.25)

# we choose epsilon to be small: 10^(-5), as we did in Hermes et al., (2024)
# now we can fit our model
epsilon <- 10^(-5)
verbose <- FALSE

result <- sfpl_approx(x, y, ls_vec, lf_vec, epsilon, verbose)

# now we select the best models using our model selection function
sfpl_select(result, x, y, ls_vec, lf_vec)
# }

Run the code above in your browser using DataLab