Learn R Programming

bhm (version 1.1)

control: Auxiliary function for bhm fitting

Description

Auxiliary function for bhm fitting. Typically only used internally by 'bhmFit', but may be used to construct a control argument to either function.

Usage

bhmControl(method = 'Bayes', interaction, biomarker.main, alpha, B, R, thin, epsilon, c.n, beta0, sigma0)

Arguments

method
choose either `Bayes' for Bayes method with MCMC or `profile' for profile likelihood method with Bootstrap. The default value is 'Bayes'
interaction
an option of fitting model with interaction term When interaction = TRUE, a predictive biomarker model will be fitted When interaction = FALSE, a prognostic biomarker model will be fitted The default value is interaction = TRUE.
biomarker.main
include biomarker main effect, default is TRUE
B
number of burn in
R
number of replications for Bayes meothd or number of Bootstrap for profile likelihood method
thin
thinning parameter for Gibbs samples, default is 2
epsilon
step length for profile likelihood method, default is 0.01
alpha
significance level (e.g. alpha=0.05)
c.n
number of threshold (i.e. the cut point), default is 1
beta0
initial value for mean of the prior distribution of beta, default is 0
sigma0
initial value for variance of the prior distribution of beta, default is 10000

Value

This function checks the internal consisitency and returns a list of value as inputed to control model fit of bhm.

Details

Control is used in model fitting of `bhm'.

See Also

bhm

Examples

Run this code
## To fit a prognostic model for biomarker with two cut-points, 
## 500 burn-in samples and 10000 Gibbs samples,

ctl = bhmControl(interaction = FALSE, B = 500, R = 10000, c.n = 2)

##
## then fit the following model
##
#  fit = bhmFit(x, y, family = 'surv', control = ctl)
##

Run the code above in your browser using DataLab