Skip to content

Commit

Permalink
Add levels to grouped estimates in summary
Browse files Browse the repository at this point in the history
  • Loading branch information
vdorie committed Sep 30, 2021
1 parent e8bb8d4 commit 7dcab23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/summary.R
Expand Up @@ -271,6 +271,7 @@ getATEEstimates <- function(object, target, ci.style, ci.level, pate.style)
names(interval) <- c("ci.lower", "ci.upper")
c(estimate, interval, n = n.obs)
})))
row.names(estimates) <- levels(object$group.by)

# combine back to get whole if possible
if (object$method.rsp %in% "bart") {
Expand All @@ -281,7 +282,7 @@ getATEEstimates <- function(object, target, ci.style, ci.level, pate.style)
estimate <- eval(estimateCall)
interval <- eval(intervalCall)

totalName <- "tot"
totalName <- "total"
while (totalName %in% rownames(estimates))
totalName <- paste0(totalName, ".")
estimates[totalName,] <- c(estimate, interval, n.obs)
Expand Down
3 changes: 3 additions & 0 deletions inst/NEWS.Rd
Expand Up @@ -36,6 +36,9 @@
\item Confounder expressions that can evaluate successfully in the calling
environment but yield a warning are now treated as if they threw
an error.
\item \code{summary} for models fit with \code{group.effects} as
\code{TRUE} will use the level names of the grouping factor
when reporting the sub-group estimates.
}
}
\subsection{BUG-FIXES}{
Expand Down

0 comments on commit 7dcab23

Please sign in to comment.