Skip to content

Commit

Permalink
Merge pull request #48 from mcaceresb/issue47_sigmascale
Browse files Browse the repository at this point in the history
Pull Request for #47: Error with some vcov matrices
  • Loading branch information
jonathandroth authored Nov 9, 2023
2 parents 9f8379b + 4053672 commit 5773ea4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/arp-nuisance.R
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,12 @@
B_index = (linSoln$lambda > tol_lambda)
Bc_index = (B_index == FALSE)
X_TB = base::matrix( X_T_ARP[B_index,], ncol = base::ncol(X_T_ARP) ) # select binding moments
Xdim = base::min(base::dim(X_TB))
# Check whether binding moments have full rank.
if (base::is.vector(X_TB)) {
if (base::is.vector(X_TB) | (Xdim == 0)) {
fullRank_flag = FALSE
} else {
fullRank_flag = (Matrix::rankMatrix(X_TB) == base::min(base::dim( X_TB ) ))
fullRank_flag = (Matrix::rankMatrix(X_TB) == Xdim)
}

# If degenerate or binding moments don't have full rank, switch to dual
Expand Down

0 comments on commit 5773ea4

Please sign in to comment.