We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb77a17 commit 84a52e2Copy full SHA for 84a52e2
R/bart.R
@@ -2219,6 +2219,11 @@ predict.bartmodel <- function(
2219
rfx_param_list <- object$rfx_samples$extract_parameter_samples()
2220
rfx_beta_draws <- rfx_param_list$beta_samples * y_std
2221
2222
+ # Promote to an array with consistent dimensions when there's one rfx term
2223
+ if (length(dim(rfx_beta_draws)) == 2) {
2224
+ dim(rfx_beta_draws) <- c(1, dim(rfx_beta_draws))
2225
+ }
2226
+
2227
# Construct a matrix with the appropriate group random effects arranged for each observation
2228
rfx_predictions_raw <- array(
2229
NA,
0 commit comments