init_lambda_hyperparameters: Initialize lambda hyperparameters

View source: R/utils.R

init_lambda_hyperparametersR Documentation

Initialize lambda hyperparameters

Description

Propose lambda hyperparameters for the choice of initial values for lambda

Usage

init_lambda_hyperparameters(group_data, s, w = 0.5)

Arguments

group_data

group level data

s

split points

w

weight

Value

shape and rate for the estimated lambda distribution

Examples

set.seed(111)
# Load example data and set your initial values and hyper parameters
data(weibull_cc, package = "BayesFBHborrow")
data(weibull_hist, package = "BayesFBHborrow")

Y <- weibull_cc$tte
I <- weibull_cc$event
X <- weibull_cc$X_trt

# Say we want to know the group level data for the following split points
s <- quantile(Y, c(0, 0.45, 0.65, 1), names = FALSE)

group_data <- group_summary(Y, I, NULL, s)
init_lambda_hyperparameters(group_data, s)

BayesFBHborrow documentation built on Sept. 30, 2024, 9:17 a.m.