MyNixOS website logo
Description

Fits Expectile Regression for Panel Fixed Effect Model.

Fits the Expectile Regression for Fixed Effect (ERFE) estimator. The ERFE model extends the within-transformation strategy to solve the incidental parameter problem within the expectile regression framework. The ERFE model estimates the regressor effects on the expectiles of the response distribution. The ERFE estimate corresponds to the classical fixed-effect within-estimator when the asymmetric point is 0.5. The paper by Barry, Oualkacha, and Charpentier (2021, <arXiv:2108.04737>) gives more details about the ERFE model.

ERFE – Expectile Regression for Fixed Effects

CRANstatus Codecov testcoverage R-CMD-check

What is the erfe package

The erfe package estimates the expectile regression panel fixed effect model (ERFE). The ERFE model is a expectile-based method for panel data. The ERFE model extends the within transformation strategy to solve the incidental parameter problem within the expectile regression framework. The ERFE model estimates the regressor effects on the expectiles of the response distribution. The ERFE model captures the data heteroscedasticity and eliminates any bias resulting from the correlation between the regressors and the omitted factors. When $\tau=0.5$ the ERFE model estimator corresponds to the classical fixed-effects within estimator.

How to use the erfe package

The main function of the erfe package is the erfe function and consists of four arguments. The predictors matrix which corresponds to the design matrix or the matrix of regressors. Note that, the design matrix should contain time varying regressors only, because the ERFE model do not make inference for time-invariant regressors. The response variable is the continuous response variable, and the asymp parameter corresponds to the vector of asymmetric points with default values: $\tau \in (0.25, \ 0.5, \ 0.75).$ The id parameter corresponds to the subject ids and should be ordered according to the time or year.

Installation

You can install the development version of the erfe package from GitHub with:

# install.packages("devtools")
devtools::install_github("amadoudiogobarry/erfe")

Example

This is a basic example which shows you how to use the main function of the package:

library(erfe)
data(sim_panel_data) # Toy dataset
head(sim_panel_data) 
#>   id      pred1     pred2      resp nobs year
#> 1  1  1.9367572  2.386914  4.943895   50    1
#> 2  1  0.1368550  3.731007  4.584137   50    2
#> 3  1  5.8850632  3.600262  8.405295   50    3
#> 4  1  2.5455661  3.416180  6.011400   50    4
#> 5  1 -0.3971390  5.367943  6.237594   50    5
#> 6  2 -0.2610938 -1.326893 -3.258152   50    1

asymp <- c(0.25,0.5,0.75) # sequence of asymmetric points
predictors <- as.matrix(cbind(sim_panel_data$pred1, sim_panel_data$pred2)) # design matrix
response <- sim_panel_data$resp # response variable
id <- sim_panel_data$id # ordered subject ids variable
outlist <- erfe(predictors, response, asymp=c(0.25,0.5,0.75), id)

For each asymmetric point, we have a list of results including the asymmetric point itself, the estimator and the estimator of its covariance matrix, and the residuals of the model. For example, the results of the ERFE model for $\tau=0.75$ can be retrieved like this:

outlist75 <- outlist[[3]]
# coef estimate
outlist75$coefEst
#>        X1        X2 
#> 0.5995653 0.9585377
# covariance estimate
outlist75$covMat
#> 2 x 2 Matrix of class "dgeMatrix"
#>            [,1]      [,2]
#> [1,] 0.04042441 0.1457498
#> [2,] 0.14574977 0.6555698
Metadata

Version

0.0.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows