Title: | Sparse Fused Plackett-Luce |
---|---|
Description: | Implements the methodological developments found in Hermes, van Heerwaarden, and Behrouzi (2024) <doi:10.48550/arXiv.2308.04325>, and allows for the statistical modeling of multi-group rank data in combination with object variables. The package also allows for the simulation of synthetic multi-group rank data. |
Authors: | Sjoerd Hermes [aut, cre] |
Maintainer: | Sjoerd Hermes <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0 |
Built: | 2024-12-25 06:29:05 UTC |
Source: | CRAN |
Simulates (partial) rank data for multiple groups together with object variables.
data_sim(m, M, n, p, K, delta, eta)
data_sim(m, M, n, p, K, delta, eta)
m |
Length of the partial ranking for each observation. |
M |
Total number of objects. |
n |
Number of observations (rankers) per group. |
p |
Number of object variables. |
K |
Number of groups. |
delta |
Approximate fraction of different coefficients across the |
eta |
Approximate fraction of sparse coefficients in |
y |
A list consisting of |
x |
A |
beta |
A |
Sjoerd Hermes
Maintainer: Sjoerd Hermes [email protected]
1. Hermes, S., van Heerwaarden, J., and Behrouzi, P. (2024). Joint Learning from Heterogeneous Rank Data. arXiv preprint, arXiv:2407.10846
data_sim(3, 10, 50, 5, 2, 0.25, 0.25)
data_sim(3, 10, 50, 5, 2, 0.25, 0.25)
This is a real dataset containing information on 5 object variables describing the properties of 13 different sweet potato varieties. In addition, the dataset contains partial rankings made by men and women from Ghana.
data("ghana")
data("ghana")
A list with three dataframes. The first consists of the rankings made by men, the second consists of the rankings made by women and the third contain the object variables.
Contains a subset of the data used in the Hermes et al. (2024) paper.
Data from the Hermes et al. (2024) paper is based on Moyo et al. (2021).
1. Hermes, S., van Heerwaarden, J., and Behrouzi, P. (2024). Joint Learning from Heterogeneous Rank Data. arXiv preprint, arXiv:2407.10846
2. Moyo, M., R. Ssali, S. Namanda, M. Nakitto, E. K. Dery, D. Akansake, J. Adjebeng-Danquah, J. van Etten,
K. de Sousa, H. Lindqvist-Kreuze, et al. (2021). Consumer preference testing of boiled sweetpotato using
crowdsourced citizen science in Ghana and Uganda. Frontiers in Sustainable Food Systems 5, 620363.
data(ghana)
data(ghana)
Contains the main function of this package that is used to estimate the parameter of interest . The inner workings of the function are described in Hermes et al., (2024).
sfpl(x, y, ls_vec, lf_vec, epsilon, verbose)
sfpl(x, y, ls_vec, lf_vec, epsilon, verbose)
x |
A |
y |
A list consisting of |
ls_vec |
Vector containing shrinkage parameters. |
lf_vec |
Vector containing fusion penalty parameters. |
epsilon |
Small positive value used to ensure that the penalty function is differentiable. Typically set at |
verbose |
Boolean that returns the process of the parameter estimation. |
beta_est |
A list of length ls_vec |
Sjoerd Hermes
Maintainer: Sjoerd Hermes [email protected]
1. Hermes, S., van Heerwaarden, J., and Behrouzi, P. (2024). Joint Learning from Heterogeneous Rank Data. arXiv preprint, arXiv:2407.10846
# 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(x, y, ls_vec, lf_vec, epsilon, verbose)
# 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(x, y, ls_vec, lf_vec, epsilon, verbose)
Contains an approximate (typically faster) version of the main function of this package that is used to estimate the parameter of interest . We recommend this version
due to its (relatively) fast convergence.
sfpl_approx(x, y, ls_vec, lf_vec, epsilon, verbose)
sfpl_approx(x, y, ls_vec, lf_vec, epsilon, verbose)
x |
A |
y |
A list consisting of |
ls_vec |
Vector containing shrinkage parameters. |
lf_vec |
Vector containing fusion penalty parameters. |
epsilon |
Small positive value used to ensure that the penalty function is differentiable. Typically set at |
verbose |
Boolean that returns the process of the parameter estimation. |
beta_est |
A list of length ls_vec |
Sjoerd Hermes
Maintainer: Sjoerd Hermes [email protected]
1. Hermes, S., van Heerwaarden, J., and Behrouzi, P. (2024). Joint Learning from Heterogeneous Rank Data. arXiv preprint, arXiv:2407.10846
# 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)
# 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)
This function selects the "best" fitted SFPL model using either the AIC or the BIC, see Hermes et al., (2024).
sfpl_select(beta_est, x, y, ls_vec, lf_vec)
sfpl_select(beta_est, x, y, ls_vec, lf_vec)
beta_est |
A list of length ls_vec |
x |
A |
y |
A list consisting of |
ls_vec |
Vector containing shrinkage parameters. |
lf_vec |
Vector containing fusion penalty parameters. |
model_aic |
A |
model_bic |
A |
Sjoerd Hermes
Maintainer: Sjoerd Hermes [email protected]
1. Hermes, S., van Heerwaarden, J., and Behrouzi, P. (2024). Joint Learning from Heterogeneous Rank Data. arXiv preprint, arXiv:2407.10846
# 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)
# 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)