Learn R Programming

WALS (version 0.2.6)

Weighted-Average Least Squares Model Averaging

Description

Implements Weighted-Average Least Squares model averaging for negative binomial regression models of Huynh (2024) , generalized linear models of De Luca, Magnus, Peracchi (2018) and linear regression models of Magnus, Powell, Pruefer (2010) , see also Magnus, De Luca (2016) . Weighted-Average Least Squares for the linear regression model is based on the original 'MATLAB' code by Magnus and De Luca , see also Kumar, Magnus (2013) and De Luca, Magnus (2011) .

Copy Link

Version

Install

install.packages('WALS')

Monthly Downloads

126

Version

0.2.6

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Kevin Huynh

Last Published

July 13th, 2025

Functions in WALS (0.2.6)

dlaplace

Internal function: Laplace density
fitNB2

Internal function: Fits a NB2 regression via maximum likelihood with log-link for mean and dispersion parameter.
predict.wals

Methods for wals and walsMatrix Objects
predict.walsGLM

Methods for walsGLM, walsGLMmatrix, walsNB and walsNBmatrix Objects
familyPrior

Family Objects for Prior Distributions in WALS
svdLSplus

Internal function: Uses SVD components to compute final estimate via Sherman-Morrison-Woodbury formula.
semiorthogonalize

Internal function: Semiorthogonal-type transformation of X2 to Z2
predictCounts

Internal methods: Predict probability for counts
walsGLM

Weighted Average Least Squares for Generalized Linear Models
walsGLMfitIterate

Iteratively fitting walsGLM, internal function for walsGLM.formula and walsGLM.matrix.
walsGLMfit

Fitter function for Weighted Average Least Squares estimation of GLMs
vcov.walsNB

Calculate Variance-Covariance Matrix for a "walsNB" object
walsFit

Fitter function for Weighted Average Least Squares estimation
snbinom

Internal function: first derivatives of NB2 PMF
wals

Weighted-Average Least Squares for linear regression models
walsNBfit

Fitter function for Weighted Average Least Squares estimation of NB2 regression model
walsNB

Weighted-Average Least Squares for Negative Binomial Regression
walsNBfitIterate

Iteratively fitting walsNB, internal function for walsNB.formula and walsNB.matrix.
computeGamma1r

Internal function: Computes fully restricted one-step ML estimator for transformed regressors in walsNB
computeGammaUnSVD

Internal function: Computes unrestricted one-step ML estimator for transformed regressors in walsNB
controlNB

Control function for initial NB fit
computePosterior

Internal function: Compute posterior mean and variance of normal location problem
GrowthMPP

Determinants of Economic Growth
checkSingularitySVD

Internal function: Check singularity of SVDed matrix
computeX2M1X2

Internal function: Computes X2M1X2 for walsNB when SVD is applied to Z1
computeGamma1

Internal function: Compute model-averaged estimator of focus regressors in walsNB
controlGLM

Control function for initial GLM fit
ddweibull

Internal function: double (reflected) Weibull density
dsubbotin

Internal function: Subbotin density
familyWALS

Extended Family Objects for Models
negativeBinomial

Negative binomial family
gammaToBeta

Internal function: Transform gammas back to betas
GrowthMP

Determinants of Economic Growth