diff --git a/R/bart.R b/R/bart.R index 2f334682..7fe1c3de 100644 --- a/R/bart.R +++ b/R/bart.R @@ -696,9 +696,9 @@ bart <- function(X_train, y_train, leaf_basis_train = NULL, rfx_group_ids_train # Prior parameters if (is.null(rfx_working_parameter_prior_mean)) { if (num_rfx_components == 1) { - alpha_init <- c(1) + alpha_init <- c(0) } else if (num_rfx_components > 1) { - alpha_init <- c(1,rep(0,num_rfx_components-1)) + alpha_init <- rep(0,num_rfx_components) } else { stop("There must be at least 1 random effect component") } diff --git a/R/bcf.R b/R/bcf.R index 86aef8cd..74e9476f 100644 --- a/R/bcf.R +++ b/R/bcf.R @@ -878,9 +878,9 @@ bcf <- function(X_train, Z_train, y_train, propensity_train = NULL, rfx_group_id # Prior parameters if (is.null(rfx_working_parameter_prior_mean)) { if (num_rfx_components == 1) { - alpha_init <- c(1) + alpha_init <- c(0) } else if (num_rfx_components > 1) { - alpha_init <- c(1,rep(0,num_rfx_components-1)) + alpha_init <- rep(0,num_rfx_components) } else { stop("There must be at least 1 random effect component") }