erfe | R Documentation |

This function is the main fucntion of the erfe package.
It estimates the
ERFE model for a panel dataset and for a sequence of asymmetric point
*τ \in (0, 1)*. When *τ=0.5* the function estimate the
classical within-transformation estimator and its sandwich covariance
matrix.

erfe(predictors, response, asymp = c(0.25, 0.5, 0.75), id)

`predictors` |
Numeric matrix of covariates/regressors. |

`response` |
Numeric vector of response variable. |

`asymp` |
Sequence of asymmetric points. |

`id` |
Ordered vector of subject ids. |

Returns a list of list according to the asymmetric points. Each list has objects related to the erfe model such as the asymmetric point, the coefficient-estimate, the standard deviation, the estimated covariance.

Amadou Barry, barryhafia@gmail.com

Barry, Amadou, Oualkacha, Karim, and Charpentier
Arthur. (2022). *Weighted asymmetric least squares
regression with fixed-effects*.
arXiv preprint arXiv:2108.04737

set.seed(13) temps_obs <- 5 n_subj <- 50 sig <- diag(rep(1,temps_obs)) id <- rep(1:n_subj, each=temps_obs) rvec <- c(mvtnorm::rmvnorm(n_subj, sigma = sig)) fvec <- (1 + rep(rnorm(n_subj) , each=temps_obs)) predictors <- cbind(rt(n_subj * temps_obs, df=2, ncp=1.3), 1.2 * fvec + rnorm(n_subj * temps_obs, mean = 0.85, sd = 1.5) ) response <- 0.6 * predictors[, 1] + predictors[, 2] + fvec + rvec asymp <- c(0.25,0.5,0.75) erfe(predictors, response, asymp=c(0.25,0.5,0.75), id)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.