Skip to content

Commit

Permalink
Add extract_coefficient_helper() fix for when model formula is ~1.
Browse files Browse the repository at this point in the history
  • Loading branch information
brgew committed Feb 9, 2024
1 parent e630409 commit c92b1c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/expr_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ extract_coefficient_helper = function(model, model_summary,
# We need this because some summary methods "format" the coefficients into
# a factor...
coef_mat <- apply(coef_mat, 2, function(x) {as.numeric(as.character(x)) })
if (!is.matrix(coef_mat)) {
coef_mat = t(as.matrix(coef_mat))
}
row.names(coef_mat) = row.names(model_summary$coefficients)
colnames(coef_mat) = c('estimate',
'std_err',
Expand Down

0 comments on commit c92b1c1

Please sign in to comment.