Skip to content

Commit

Permalink
Trying to fix the bug #191 again
Browse files Browse the repository at this point in the history
  • Loading branch information
config-i1 committed Feb 7, 2022
1 parent 99eb910 commit 428cd7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ssGeneral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,8 @@ List backfitter(arma::mat &matrixVt, arma::mat const &matrixF, arma::rowvec cons

// This is a failsafe for cases of ridiculously high and ridiculously low values
if(vecYfit(i-lagsModelMax) > 1e+100){
if(i-lagsModelMax==0){
// If this is the first value, substitute with zero
if(i==lagsModelMax){
vecYfit(i-lagsModelMax) = 0;
}
else{
Expand Down Expand Up @@ -982,7 +983,8 @@ List backfitter(arma::mat &matrixVt, arma::mat const &matrixF, arma::rowvec cons

// This is for cases of ridiculously high and ridiculously low values
if(vecYfit(i-lagsModelMax) > 1e+100){
if(i-lagsModelMax==obs+lagsModelMax){
// If this is the first value, substitute with zero
if(i==obs+lagsModelMax-1){
vecYfit(i-lagsModelMax) = 0;
}
else{
Expand Down

0 comments on commit 428cd7d

Please sign in to comment.