BayesFBHborrow.NoBorrow {BayesFBHborrow} | R Documentation |

## Run the MCMC sampler without Bayesian Borrowing

### Description

Main function of the BayesFBHborrow package. This generic function calls the correct MCMC sampler for time-to-event without Bayesian borrowing.

### Usage

```
## S3 method for class 'NoBorrow'
BayesFBHborrow(
data,
data_hist = NULL,
borrow = FALSE,
model_choice = "no_borrow",
tuning_parameters = NULL,
hyperparameters = NULL,
lambda_hyperparameters = list(a_lambda = 0.01, b_lambda = 0.01),
iter = 2000,
warmup_iter = 2000,
refresh = 0,
verbose = FALSE,
max_grid = 2000
)
```

### Arguments

`data` |
data.frame containing atleast three vectors of "tte" (time-to-event) and "event" (event indicator), and covariates "X_i" (where i should be a number/ indicator of the covariate) |

`data_hist` |
NULL (not used) |

`borrow` |
FALSE (default), will run the model with borrowing |

`model_choice` |
'no_borrow' (default), for no borrowing |

`tuning_parameters` |
list of "cprop_beta", "Jmax", and "pi_b". Default is ("Jmax" = 5, "cprop_beta" = 0.5, "pi_b" = 0.5) |

`hyperparameters` |
list containing the hyperparameters c("a_sigma", "b_sigma", "phi", clam_smooth"). Default is list("a_sigma" = 2, "b_sigma" = 2, "phi" = 3 , "clam_smooth" = 0.8) |

`lambda_hyperparameters` |
contains two hyperparameters ("a_lambda" and "b_lambda") used for the update of lambda, default is c(0.01, 0.01) |

`iter` |
number of iterations for MCMC sampler. Default is 2000 |

`warmup_iter` |
number of warmup iterations (burn-in) for MCMC sampler. Default is 2000 |

`refresh` |
number of iterations between printed console updates. Default is 0 |

`verbose` |
FALSE (default), choice of output, if TRUE will output intermittent results into console |

`max_grid` |
grid size for the smoothed baseline hazard. Default is 2000 |

### Value

a nested list of two items, 'out' and 'plots'. The list 'out' will contain all the samples of the MCMC chain, as well as acceptance ratios. The latter, 'plots', contains plots (and data) of the smoothed baseline hazard, smoothed survival, a histogram of the sampled number of split points, and the trace plot of the treatment effect beta_1

### Examples

```
set.seed(123)
# Load the example data
data(piecewise_exp_cc, package = "BayesFBHborrow")
# Set your tuning parameters
tuning_parameters <- list("Jmax" = 5,
"cprop_beta" = 3.25)
# Set initial values to default
out <- BayesFBHborrow(piecewise_exp_cc, NULL, borrow = FALSE,
tuning_parameters = tuning_parameters,
iter = 2, warmup_iter = 0)
```

*BayesFBHborrow*version 2.0.1 Index]