Skip to content

Commit

Permalink
fix bug for tmb for gene4s with error
Browse files Browse the repository at this point in the history
  • Loading branch information
stemangiola committed Sep 15, 2023
1 parent 24673bd commit f65d233
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion R/glmmSeq.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Source car:::ConjComp
car_ConjComp <- function (X, Z = diag(nrow(X)), ip = diag(nrow(X))){
xq <- qr(t(Z) %*% ip %*% X)
if (xq$rank == 0)
return(Z)
Z %*% qr.Q(xq, complete = TRUE)[, -(1:xq$rank)]
}

## Source car:::relatives
car_relatives <- function (term, names, factors)
{
Expand Down Expand Up @@ -300,7 +308,7 @@ glmmTMBcore = function (geneList, fullFormula, reduced, data, family, control,
}
else {
return(list(stats = NA, coef = NA, stdErr = NA, chisq = NA,
df = NA, predict = NA, optinfo = NA, ci_random_effect_df = NA, tryErrors = fit[1]))
df = NA, predict = NA, optinfo = NA, ci_random_effect_df = NA, message = "COMPLETE FIT ERROR", tryErrors = fit[1]))
}
}

Expand Down

0 comments on commit f65d233

Please sign in to comment.