R/RcppExports.R

Defines functions loss_erlasso loss_erfe loss_er loss_mqrlasso loss_mqrfe loss_mqr loss_qrlasso loss_qrfe loss_qr d_psi_als psi_als d_psi_mq psi_mq rho_mq rho_koenker

Documented in d_psi_als d_psi_mq loss_er loss_erfe loss_erlasso loss_mqr loss_mqrfe loss_mqrlasso loss_qr loss_qrfe loss_qrlasso psi_als psi_mq rho_koenker rho_mq

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Rho Koenker
#'
#' @param x generic vector
#' @param tau percentile
#' 
#' @return y vector, linear transformation by rho 
rho_koenker <- function(x, tau) {
    .Call(`_pqrfe_rho_koenker`, x, tau)
}

#' Rho M-quantile
#'
#' @param x generic vector
#' @param tau percentile
#' @param c tuning
#' 
#' @return y vector, linear transformation by m-rho
rho_mq <- function(x, tau, c) {
    .Call(`_pqrfe_rho_mq`, x, tau, c)
}

#' Psi M-quantile
#'
#' @param x generic vector
#' @param tau percentile
#' @param c tuning
#' 
#' @return y vector, linear transformation by m-rho derivative
psi_mq <- function(x, tau, c) {
    .Call(`_pqrfe_psi_mq`, x, tau, c)
}

#' D Psi M-quantile
#'
#' @description Derivative of psi M-quantile
#'
#' @param x generic vector
#' @param tau percentile
#' @param c tuning
#' 
#' @return y vector, linear transformation by second derivative m-rho
d_psi_mq <- function(x, tau, c) {
    .Call(`_pqrfe_d_psi_mq`, x, tau, c)
}

#' Psi ALS
#'
#' @description Psi asymetric least square
#'
#' @param x generic vector
#' @param tau percentile
#' 
#' @return y vector, linear transformation by ALS psi
psi_als <- function(x, tau) {
    .Call(`_pqrfe_psi_als`, x, tau)
}

#' D Psi ALS
#'
#' @description Derivative of Psi asymetric least square
#'
#' @param x generic vector
#' @param tau percentile
#' 
#' @return y vector, linear transformation by derivative ALS psi
d_psi_als <- function(x, tau) {
    .Call(`_pqrfe_d_psi_als`, x, tau)
}

#' Loss quantile regression
#' 
#' @description This function returns the core of quantile regression to be minimized
#'
#' @param beta initial values
#' @param x design matrix
#' @param y vector output
#' @param tau percentile
#' @param N sample size
#' @param d columns of x  
#' 
#' @return eta Numeric, sum of quantile regression
loss_qr <- function(beta, x, y, tau, N, d) {
    .Call(`_pqrfe_loss_qr`, beta, x, y, tau, N, d)
}

#' Loss quantile regression with fixed effects
#' 
#' @description This function returns the core of quantile regression with fixed effects to be minimized
#'
#' @param theta initial values
#' @param x design matrix
#' @param y vector output
#' @param z incident matrix
#' @param tau percentile
#' @param n N sample size
#' @param d columns of x
#' @param mm n columns of z   
#' 
#' @return eta Numeric, sum of quantile regression with fixed effects
loss_qrfe <- function(theta, x, y, z, tau, n, d, mm) {
    .Call(`_pqrfe_loss_qrfe`, theta, x, y, z, tau, n, d, mm)
}

#' Loss lasso quantile regression with fixed effects
#'
#' @description This function returns the core of lasso quantile regression with fixed effects to be minimized
#'
#' @param theta initial values
#' @param x design matrix
#' @param y vector output
#' @param z incident matrix
#' @param tau percentile
#' @param n N sample size
#' @param d columns of x
#' @param mm n columns of z  
#' @param lambda constriction parameter
#' 
#' @return eta Numeric, sum of lasso quantile regression with fixed effects
loss_qrlasso <- function(theta, x, y, z, tau, n, d, mm, lambda) {
    .Call(`_pqrfe_loss_qrlasso`, theta, x, y, z, tau, n, d, mm, lambda)
}

#' Loss M-quantile regression
#'
#' @description This function returns the core of M-quantile regression to be minimized
#'
#' @param beta initial values
#' @param x design matrix
#' @param y vector output
#' @param tau percentile
#' @param N sample size
#' @param d columns of x  
#' @param c tuning
#' 
#' @return eta Numeric, sum of M-quantile regression
loss_mqr <- function(beta, x, y, tau, N, d, c) {
    .Call(`_pqrfe_loss_mqr`, beta, x, y, tau, N, d, c)
}

#' Loss M-quantile regression with fixed effects
#'
#' @description This function returns the core of M-quantile regression with fixed effects to be minimized
#'
#' @param theta initial values
#' @param x design matrix
#' @param y vector output
#' @param z incident matrix
#' @param tau percentile
#' @param n N sample size
#' @param d columns of x
#' @param mm n columns of z 
#' @param c tuning
#' 
#' @return eta Numeric, sum of M-quantile regression with fixed effects
loss_mqrfe <- function(theta, x, y, z, tau, n, d, mm, c) {
    .Call(`_pqrfe_loss_mqrfe`, theta, x, y, z, tau, n, d, mm, c)
}

#' Loss lasso M-quantile regression with fixed effects
#' 
#' @description This function returns the core of lasso M-quantile regression with fixed effects to be minimized   
#'
#' @param theta initial values
#' @param x design matrix
#' @param y vector output
#' @param z incident matrix
#' @param tau percentile
#' @param n N sample size
#' @param d columns of x
#' @param mm n columns of z  
#' @param c tuning
#' @param lambda constriction parameter
#' 
#' @return eta Numeric, sum of lasso M-quantile regression with fixed effects
loss_mqrlasso <- function(theta, x, y, z, tau, n, d, mm, c, lambda) {
    .Call(`_pqrfe_loss_mqrlasso`, theta, x, y, z, tau, n, d, mm, c, lambda)
}

#' Loss expectile regression
#'
#' @description This function returns the core of expectile regression to be minimized   
#' 
#' @param beta initial values
#' @param x design matrix
#' @param y vector output
#' @param tau percentile
#' @param N sample size
#' @param d columns of x  
#' 
#' @return eta Numeric, sum of expectile regression
loss_er <- function(beta, x, y, tau, N, d) {
    .Call(`_pqrfe_loss_er`, beta, x, y, tau, N, d)
}

#' Loss expectile regression with fixed effects
#'
#' @description This function returns the core of expectile regression with fixed effects to be minimized   
#'
#' @param theta initial values
#' @param x design matrix
#' @param y vector output
#' @param z incident matrix
#' @param tau percentile
#' @param n N sample size
#' @param d columns of x
#' @param mm n columns of z  
#' 
#' @return eta Numeric, sum of expectile regression with fixed effects
loss_erfe <- function(theta, x, y, z, tau, n, d, mm) {
    .Call(`_pqrfe_loss_erfe`, theta, x, y, z, tau, n, d, mm)
}

#' Loss lasso expectile regression with fixed effects
#' 
#' @description This function returns the core of lasso expectile regression with fixed effects to be minimized   
#'  
#' @param theta initial values
#' @param x design matrix
#' @param y vector output
#' @param z incident matrix
#' @param tau percentile
#' @param n N sample size
#' @param d columns of x
#' @param mm n columns of z  
#' @param lambda constriction parameter
#' 
#' @return eta Numeric, sum of lasso expectile regression with fixed effects
loss_erlasso <- function(theta, x, y, z, tau, n, d, mm, lambda) {
    .Call(`_pqrfe_loss_erlasso`, theta, x, y, z, tau, n, d, mm, lambda)
}

Try the pqrfe package in your browser

Any scripts or data that you put into this service are public.

pqrfe documentation built on Dec. 1, 2022, 5:09 p.m.