glmhdfe: glmhdfe

Description Usage Arguments Author(s)

View source: R/glmhdfe.R

Description

Generalized linear model with high-dimensional fixed effects

This function allows for arbitrary sets of fixed effects in a generalized linear model.

Usage

1
2
3
4
5
6
7
glmhdfe(formula, data, family = gaussian(), beta = NULL,
  tolerance = 1e-08, max_iterations = 10000, fe_iterations = 5,
  accelerate = T, accelerate_iterations = 10,
  accelerate_aux_vector = T, compute_vcov = T, demean_variables = F,
  demean_iterations = 100, demean_tolerance = tolerance,
  include_fe = T, include_data = F, include_data_vcov = F,
  skip_checks = NULL, trace = F, verbose = F)

Arguments

formula

Formula that describes lefthandside variable, righthandside variables of interest, sets of fixed effects and error clustering, e.g. y ~ x | fe1 + fe2 | cluster1 + cluster2

data

data.table or data.frame with data used in the regression

family

Estimator used, currently limited to gaussian(link = "identity"), gaussian(link = "log"), poisson(link = "log"), Gamma(link = "log") and inverse.gaussian(link = "log")

beta

Initial beta vector, defaults to 0

tolerance

Iteration stops when tolerance is reached (numeric)

max_iterations

Iteration stops when maximum number of iteration is reached (integer)

fe_iterations

Iterations for fixed effects to "catch up" when initial beta vector is provided

accelerate

Acceleration algorithm for finding betas

accelerate_iterations

Number of iterations before starting acceleration algorithm

accelerate_aux_vector

Include fixed effects vectors in IRLS? Usually increases convergence speed

compute_vcov

Compute variance-covariance matrix? Can be computed ex-post when data from estimation provided.

demean_variables

Demean variables to be used in estimation of variance-covariance matrix?

demean_iterations

Iterations for demeaning algorithm

demean_tolerance

Demeaning tolerance

include_fe

Return fixed effects?

include_data

Return data used in estimation?

include_data_vcov

Return data used in variance-covariance matrix estimation?

skip_checks

Skip checks before starting procedure? Character vector can include "separation", "complete_cases", "multicollinearity".

trace

Show some information during estimation

verbose

Show more information during estimation for the impatient

Author(s)

Julian Hinz and Joschka Wanner


julianhinz/R_glmhdfe documentation built on Feb. 11, 2022, 7:37 a.m.