All Projects → FixedEffects → FixedEffectjlr

FixedEffects / FixedEffectjlr

Licence: other
R interface for Fixed Effect Models

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to FixedEffectjlr

Ml
A high-level machine learning and deep learning library for the PHP language.
Stars: ✭ 1,270 (+6250%)
Mutual labels:  clustering, regression
Tiny ml
numpy 实现的 周志华《机器学习》书中的算法及其他一些传统机器学习算法
Stars: ✭ 129 (+545%)
Mutual labels:  clustering, regression
Machine learning code
机器学习与深度学习算法示例
Stars: ✭ 88 (+340%)
Mutual labels:  clustering, regression
Tribuo
Tribuo - A Java machine learning library
Stars: ✭ 882 (+4310%)
Mutual labels:  clustering, regression
Orange3
🍊 📊 💡 Orange: Interactive data analysis
Stars: ✭ 3,152 (+15660%)
Mutual labels:  clustering, regression
Mlj.jl
A Julia machine learning framework
Stars: ✭ 982 (+4810%)
Mutual labels:  clustering, regression
Mlr
Machine Learning in R
Stars: ✭ 1,542 (+7610%)
Mutual labels:  clustering, regression
R
All Algorithms implemented in R
Stars: ✭ 294 (+1370%)
Mutual labels:  clustering, regression
Uci Ml Api
Simple API for UCI Machine Learning Dataset Repository (search, download, analyze)
Stars: ✭ 190 (+850%)
Mutual labels:  clustering, regression
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+10885%)
Mutual labels:  clustering, regression
Machine Learning Octave
🤖 MatLab/Octave examples of popular machine learning algorithms with code examples and mathematics being explained
Stars: ✭ 637 (+3085%)
Mutual labels:  clustering, regression
ml-book
Codice sorgente ed Errata Corrige del mio libro "A tu per tu col Machine Learning"
Stars: ✭ 16 (-20%)
Mutual labels:  clustering, regression
Smile
Statistical Machine Intelligence & Learning Engine
Stars: ✭ 5,412 (+26960%)
Mutual labels:  clustering, regression
scicloj.ml
A Clojure machine learning library
Stars: ✭ 152 (+660%)
Mutual labels:  clustering, regression
Tensorflow Book
Accompanying source code for Machine Learning with TensorFlow. Refer to the book for step-by-step explanations.
Stars: ✭ 4,448 (+22140%)
Mutual labels:  clustering, regression
Neuroflow
Artificial Neural Networks for Scala
Stars: ✭ 105 (+425%)
Mutual labels:  clustering, regression
Pycaret
An open-source, low-code machine learning library in Python
Stars: ✭ 4,594 (+22870%)
Mutual labels:  clustering, regression
Alink
Alink is the Machine Learning algorithm platform based on Flink, developed by the PAI team of Alibaba computing platform.
Stars: ✭ 2,936 (+14580%)
Mutual labels:  clustering, regression
Machine Learning Projects
This repository consists of all my Machine Learning Projects.
Stars: ✭ 135 (+575%)
Mutual labels:  clustering, regression
Machine-Learning-Algorithms
All Machine Learning Algorithms
Stars: ✭ 24 (+20%)
Mutual labels:  clustering, regression

R interface for Fixed Effect Models

Build Status codecov

This package uses the FixedEffectModels.jl julia package and the JuliaCall R library to estimate large fixed effects models in R.

It is a substitute to the felm R package. It is usually faster (see benchmarks. I find it also to be more robust to actually converge. I use the JuliaCall library to pass datasets into julia and process them using the FixedEffectModels.jl and InteractiveFixedEffectModels.jl libraries. The package is very preliminary, so please use it and let me know if you run into issues!

Thanks to Matthieu and Changcheng.

Usage

Install the package directly from github

devtools::install_github("eloualiche/FixedEffectjlr")

To actually use the package in R, first setup julia to work within R with JuliaCall (see more details about setting up on the package webpage)

library(FixedEffectjlr)
JULIA_HOME <- "/Applications/Julia-1.1.app/Contents/Resources/julia/bin/"
FixedEffect_setup(JULIA_HOME)

To run a regression with fixed effects

df <- Ecdat::Cigar
reg_res <- FixedEffect(df,
  lhs = "sales", rhs = "ndi",
  fe      = c("state", "year"),
  weights = "pop",
  vcov    = c("state"))
  
#                          Fixed Effect Model
# =====================================================================
# Number of obs:               1380   Degrees of freedom:            31
# R2:                         0.804   R2 within:                  0.139
# F-Statistic:              13.3481   p-value:                    0.000
# Iterations:                     6   Converged:                   true
# =====================================================================
#         Estimate  Std.Error  t value Pr(>|t|)   Lower 95%   Upper 95%
# ---------------------------------------------------------------------
# ndi  -0.00526264 0.00144043 -3.65351    0.000 -0.00808837 -0.00243691
# =====================================================================  
  • For now the functions takes as inputs different strings for independent variable, regressors and fixed effects instead of a formula as in felm.
  • FixedEffectModels.jl accepts arbitrary number of fixed effects as well as interaction of categorical variables:
fe = c("year", "firm")
fe = c("industry:year")  # interaction without levels
fe = c("industry*year")  # interaction with levels
fe = c("industry:^year") # treat second variable as continuous 
fe = c("industry*^year") # treat second variable as continuous with first level
  • Standard errors are either adjusted for heteroscedasticity, robust or clustered by categories:
vcov = "robust"
vcov = c("industry", "year")
  • It is also possible to add weights:
weights = "pop"

Output

The functions prints out a table that is generated directly from julia. Moreover it collects information about the regressions and output two lists:

  • reg_res$results should eventually become a regression class like lm or felm and keeps in memory most of the julia output
  • reg_res$summary is most useful to create regression tables and keep regressors, standard errors, etc...
  • reg_res$summary$coeftest for a coeftest object, to be used directly in stargazer

Vignettes

Prerequisite:

The package requires a working installation of julia (last tested with julia 1.0.3)

Thanks

Thanks to Changcheng for developing JuliaCall.

Thanks to Matthieu for all his packages!

See other packages built on JuliaCall: convexjlr and ipoptjlr.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].