Skip to content

REndo

Fitting Linear Models with Endogenous Regressors using Latent Instrumental Variables

v2.4.11 · Mar 23, 2026 · GPL-3

Description

Fits linear models with endogenous regressor using latent instrumental variable approaches. The methods included in the package are Lewbel's (1997) <doi:10.2307/2171884> higher moments approach as well as Lewbel's (2012) <doi:10.1080/07350015.2012.643126> heteroscedasticity approach, Park and Gupta's (2012) <doi:10.1287/mksc.1120.0718> joint estimation method that uses Gaussian copula and Kim and Frees's (2007) <doi:10.1007/s11336-007-9008-1> multilevel generalized method of moment approach that deals with endogeneity in a multilevel setting. These are statistical techniques to address the endogeneity problem where no external instrumental variables are needed. See the publication related to this package in the Journal of Statistical Software for more details: <doi:10.18637/jss.v107.i03>. Note that with version 2.0.0 sweeping changes were introduced which greatly improve functionality and usability but break backwards compatibility.

Downloads

3.5K

Last 30 days

2177th

10.3K

Last 90 days

38.5K

Last year

Trend: -4.5% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 28, 2026
ERROR 6 OK · 0 NOTE · 0 WARNING · 8 ERROR · 0 FAILURE Mar 10, 2026
ERROR r-devel-linux-x86_64-debian-clang

tests

Running ‘testthat.R’ [151s/186s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(REndo)
  > library(Formula)
  > 
  > test_check("REndo")
  Saving _problems/test-correctness_multilevel-253.R
  Saving
...[truncated]...
    ├─.diag2T.smart(e1, e2, kind = "d") + e2
   14.       └─.diag2T.smart(e1, e2, kind = "d") + e2
   15.         └─Matrix:::.Ops.checkDim(dim(e1), dim(e2))
  
  [ FAIL 3 | WARN 0 | SKIP 30 | PASS 2152 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-devel-linux-x86_64-debian-gcc

tests

Running ‘testthat.R’ [103s/122s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(REndo)
  > library(Formula)
  > 
  > test_check("REndo")
  Saving _problems/test-correctness_multilevel-253.R
  Saving
...[truncated]...
    ├─.diag2T.smart(e1, e2, kind = "d") + e2
   14.       └─.diag2T.smart(e1, e2, kind = "d") + e2
   15.         └─Matrix:::.Ops.checkDim(dim(e1), dim(e2))
  
  [ FAIL 3 | WARN 0 | SKIP 30 | PASS 2152 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-devel-linux-x86_64-fedora-clang

tests

Running ‘testthat.R’ [241s/300s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(REndo)
  > library(Formula)
  > 
  > test_check("REndo")
  Saving _problems/test-correctness_multilevel-253.R
  Saving
...[truncated]...
    ├─.diag2T.smart(e1, e2, kind = "d") + e2
   14.       └─.diag2T.smart(e1, e2, kind = "d") + e2
   15.         └─Matrix:::.Ops.checkDim(dim(e1), dim(e2))
  
  [ FAIL 3 | WARN 0 | SKIP 30 | PASS 2152 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-devel-linux-x86_64-fedora-gcc

tests

Running ‘testthat.R’ [234s/299s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(REndo)
  > library(Formula)
  > 
  > test_check("REndo")
  Saving _problems/test-correctness_multilevel-253.R
  Saving
...[truncated]...
    ├─.diag2T.smart(e1, e2, kind = "d") + e2
   14.       └─.diag2T.smart(e1, e2, kind = "d") + e2
   15.         └─Matrix:::.Ops.checkDim(dim(e1), dim(e2))
  
  [ FAIL 3 | WARN 0 | SKIP 30 | PASS 2152 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-devel-windows-x86_64

tests

Running 'testthat.R' [163s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(REndo)
  > library(Formula)
  > 
  > test_check("REndo")
  Saving _problems/test-correctness_multilevel-253.R
  Saving _pro
...[truncated]...
    ├─.diag2T.smart(e1, e2, kind = "d") + e2
   14.       └─.diag2T.smart(e1, e2, kind = "d") + e2
   15.         └─Matrix:::.Ops.checkDim(dim(e1), dim(e2))
  
  [ FAIL 3 | WARN 0 | SKIP 30 | PASS 2152 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-release-linux-x86_64

tests

Running ‘testthat.R’ [147s/191s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(REndo)
  > library(Formula)
  > 
  > test_check("REndo")
  Saving _problems/test-correctness_multilevel-253.R
  Saving
...[truncated]...
    ├─.diag2T.smart(e1, e2, kind = "d") + e2
   14.       └─.diag2T.smart(e1, e2, kind = "d") + e2
   15.         └─Matrix:::.Ops.checkDim(dim(e1), dim(e2))
  
  [ FAIL 3 | WARN 0 | SKIP 30 | PASS 2152 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-release-windows-x86_64

tests

Running 'testthat.R' [160s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(REndo)
  > library(Formula)
  > 
  > test_check("REndo")
  Saving _problems/test-correctness_multilevel-253.R
  Saving _pro
...[truncated]...
    ├─.diag2T.smart(e1, e2, kind = "d") + e2
   14.       └─.diag2T.smart(e1, e2, kind = "d") + e2
   15.         └─Matrix:::.Ops.checkDim(dim(e1), dim(e2))
  
  [ FAIL 3 | WARN 0 | SKIP 30 | PASS 2152 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-oldrel-windows-x86_64

tests

Running 'testthat.R' [217s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(REndo)
  > library(Formula)
  > 
  > test_check("REndo")
  Saving _problems/test-correctness_multilevel-253.R
  Saving _pro
...[truncated]...
    ├─.diag2T.smart(e1, e2, kind = "d") + e2
   14.       └─.diag2T.smart(e1, e2, kind = "d") + e2
   15.         └─Matrix:::.Ops.checkDim(dim(e1), dim(e2))
  
  [ FAIL 3 | WARN 0 | SKIP 30 | PASS 2152 ]
  Error:
  ! Test failures.
  Execution halted

Reverse Dependencies (1)

suggests

Dependency Network

Dependencies Reverse dependencies Formula (>= 1.2) optimx mvtnorm AER Matrix lme4 reformulas data.table corpcor Rcpp lmtest marginaleffects REndo

Version History

updated 2.4.11 ← 2.4.10 diff Mar 23, 2026
new 2.4.10 Mar 10, 2026
updated 2.4.10 ← 2.4.9 diff Jul 1, 2024
updated 2.4.9 ← 2.4.8 diff Sep 4, 2023
updated 2.4.8 ← 2.4.7 diff Feb 6, 2023
updated 2.4.7 ← 2.4.6 diff Oct 20, 2022
updated 2.4.6 ← 2.4.5 diff Aug 22, 2022
updated 2.4.5 ← 2.4.3 diff May 17, 2022
updated 2.4.3 ← 2.4.2 diff Sep 2, 2021
updated 2.4.2 ← 2.4.1 diff Feb 9, 2021
updated 2.4.1 ← 2.4.0 diff Oct 14, 2020
updated 2.4.0 ← 2.3.1 diff May 23, 2020
updated 2.3.1 ← 2.3.0 diff Feb 16, 2020
updated 2.3.0 ← 2.2.1 diff Aug 4, 2019
updated 2.2.1 ← 2.2.0 diff Jun 4, 2019
updated 2.2.0 ← 2.1.0 diff Apr 13, 2019
updated 2.1.0 ← 2.0.0 diff Jan 15, 2019
updated 2.0.0 ← 1.3 diff Nov 9, 2018
updated 1.3 ← 1.2 diff Nov 7, 2017
updated 1.2 ← 1.1 diff Apr 9, 2017