Package: alpaca 0.3.5

alpaca: Fit GLM's with High-Dimensional k-Way Fixed Effects

Provides a routine to partial out factors with many levels during the optimization of the log-likelihood function of the corresponding generalized linear model (glm). The package is based on the algorithm described in Stammann (2018) <doi:10.48550/arXiv.1707.01815> and is restricted to glm's that are based on maximum likelihood estimation and nonlinear. It also offers an efficient algorithm to recover estimates of the fixed effects in a post-estimation routine and includes robust and multi-way clustered standard errors. Further the package provides analytical bias corrections for binary choice models derived by Fernandez-Val and Weidner (2016) <doi:10.1016/j.jeconom.2015.12.014> and Hinz, Stammann, and Wanner (2020) <doi:10.48550/arXiv.2004.12655>.

Authors:Amrei Stammann [aut, cre], Daniel Czarnowske [aut]

alpaca_0.3.5.tar.gz
alpaca_0.3.5.zip(r-4.7)alpaca_0.3.5.zip(r-4.6)alpaca_0.3.5.zip(r-4.5)
alpaca_0.3.5.tgz(r-4.6-x86_64)alpaca_0.3.5.tgz(r-4.6-arm64)alpaca_0.3.5.tgz(r-4.5-x86_64)alpaca_0.3.5.tgz(r-4.5-arm64)
alpaca_0.3.5.tar.gz(r-4.7-arm64)alpaca_0.3.5.tar.gz(r-4.7-x86_64)alpaca_0.3.5.tar.gz(r-4.6-arm64)alpaca_0.3.5.tar.gz(r-4.6-x86_64)
alpaca_0.3.5.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
alpaca/json (API)

# Install 'alpaca' in R:
install.packages('alpaca', repos = c('https://amrei-stammann.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/amrei-stammann/alpaca/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

openblascpp

7.64 score 47 stars 153 scripts 4.1k downloads 8 exports 5 dependencies

Last updated from:b5b4d93d57. Checks:11 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64WARNING167
linux-devel-x86_64WARNING167
source / vignettesOK293
linux-release-arm64WARNING172
linux-release-x86_64WARNING223
macos-release-arm64WARNING201
macos-release-x86_64WARNING258
macos-oldrel-arm64WARNING147
macos-oldrel-x86_64WARNING305
windows-develWARNING143
windows-releaseWARNING140
windows-oldrelWARNING178
wasm-releaseOK194

Exports:biasCorrfeglmfeglm.controlfeglm.nbfeglmControlgetAPEsgetFEssimGLM

Dependencies:data.tableFormulaMASSRcppRcppArmadillo

Estimating the intensive and extensive margin of trade
Introduction | Data preparation | Estimating the intensive margin of trade | Testing linear restrictions | Estimating the extensive margin of trade | References

Last update: 2025-12-31
Started: 2020-01-19

Replicating an Empirical Example of International Trade
Introduction | Data preparation | Some replications | Testing linear restrictions | References

Last update: 2025-12-31
Started: 2019-05-14

How to use alpaca
Generalized linear models with fixed effects | Estimating a binary-choice model with individual and time fixed effects | Further Features | References

Last update: 2022-09-19
Started: 2019-05-14

Readme and manuals

Help Manual

Help pageTopics
alpaca: A package for fitting glm's with high-dimensional k-way fixed effectsalpaca-package
alpaca: A package for fitting glm's with high-dimensional k-way fixed effectsalpaca-package alpaca
Asymptotic bias correction after fitting binary choice models with a one-/two-/three-way error componentbiasCorr
Extract estimates of average partial effectscoef.APEs
Extract estimates of structural parameterscoef.feglm
Extract coefficient matrix for average partial effectscoef.summary.APEs
Extract coefficient matrix for structural parameterscoef.summary.feglm
Efficiently fit glm's with high-dimensional k-way fixed effectsfeglm
Set 'feglm' Control Parametersfeglm.control
Efficiently fit negative binomial glm's with high-dimensional k-way fixed effectsfeglm.nb
Set 'feglm' Control Parametersfeglm.control feglmControl
Extract 'feglm' fitted valuesfitted.feglm
Compute average partial effects after fitting binary choice models with a one-/two-/three-way error componentgetAPEs
Efficiently recover estimates of the fixed effects after fitting 'feglm'getFEs
Predict method for 'feglm' fitspredict.feglm
Print 'APEs'print.APEs
Print 'feglm'print.feglm
Print 'summary.APEs'print.summary.APEs
Print 'summary.feglm'print.summary.feglm
Generate an artificial data set for some GLM's with two-way fixed effectssimGLM
Summarizing models of class 'APEs'summary.APEs
Summarizing models of class 'feglm'summary.feglm
Compute covariance matrix after estimating 'APEs'vcov.APEs
Compute covariance matrix after fitting 'feglm'vcov.feglm