The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Type: Package
Title: Flexible Regularized Estimating Equations
Version: 1.0.2
Date: 2024-05-22
Description: Unified regularized estimating equation solver. Currently the package includes one solver with the l1 penalty only. More solvers and penalties are under development. Reference: Yi Yang, Yuwen Gu, Yue Zhao, Jun Fan (2021) <doi:10.48550/arXiv.2110.11074>.
License: GPL-3
Imports: Rcpp (≥ 1.0.7)
LinkingTo: Rcpp, RcppArmadillo
Encoding: UTF-8
RoxygenNote: 7.3.1
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
NeedsCompilation: yes
Packaged: 2024-05-24 02:30:24 UTC; YLIAN
Author: Yi Lian [aut, cre], Yi Yang [aut, cph], Yuwen Gu [aut], Jun Fan [aut], Yue Zhao [aut], Robert W. Platt [aut]
Maintainer: Yi Lian <yi.lian@mail.mcgill.ca>
Repository: CRAN
Date/Publication: 2024-05-24 04:00:02 UTC

free: Flexible Regularized Estimating Equations

Description

Unified regularized estimating equation solver. Currently the package includes one solver with the l1 penalty only. More solvers and penalties are under development. Reference: Yi Yang, Yuwen Gu, Yue Zhao, Jun Fan (2021) doi:10.48550/arXiv.2110.11074.

Author(s)

Maintainer: Yi Lian yi.lian@mail.mcgill.ca

Authors:


Main solver of free

Description

Main solver of free

Usage

free_lasso(
  p,
  lambda,
  est_func,
  par_init,
  alpha,
  tau,
  maxit = 1000L,
  tol_ee = 1e-06,
  tol_par = 1e-06,
  verbose = FALSE
)

Arguments

p

The dimension of the dataset

lambda

Lasso regularization coefficient

est_func

R function, the estimating function specified by the user

par_init

Optional, initial value for parameter update

alpha

Tuning parameter

tau

Tuning parameter

maxit

Maximum iterations

tol_ee

Convergence criterion based on the update of the estimating function

tol_par

Convergence criterion based on the update of the parameter

verbose

logical, print updates

Value

A list containing the regularized estimating equation estimates and the number of iterations it takes to converge.

Examples

# Standardize data
dat <- scale(mtcars)
x <- as.matrix(dat[, -1])
y <- as.vector(dat[, 1])
n <- nrow(x)
p <- ncol(x)

# Specify estimating function
ufunc <- function(b) {
  1/n * crossprod(x, (x %*% b - y) )
}

# Set hyperparameters
tau <- 0.6
alpha <- 0.5

# Set regularization coefficient
lambda1 <- 0
free_R1 <- free_lasso(p = p,
                      lambda = lambda1,
                      est_func = ufunc,
                      par_init = rep(0, p),
                      alpha = alpha,
                      tau = tau,
                      maxit = 10000L,
                      tol_ee = 1e-20,
                      tol_par = 1e-10,
                      verbose = FALSE)
free_R1$coefficients

# Compare with lm() - very close
lm(y~x-1)$coefficients

# Set regularization coefficient
lambda2 <- 0.7
free_R2 <- free_lasso(p = p,
                      lambda = lambda2,
                      est_func = ufunc,
                      par_init = rep(0, p),
                      alpha = alpha,
                      tau = tau,
                      maxit = 10000L,
                      tol_ee = 1e-20,
                      tol_par = 1e-10,
                      verbose = FALSE)
free_R2$coefficients

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.