mcmccontrol: Markov chain Monte Carlo (MCMC) parameters

View source: R/mcmccontrol.R

mcmccontrolR Documentation

Markov chain Monte Carlo (MCMC) parameters

Description

This function is used to set various parameters controlling the Markov chain Monte Carlo (MCMC) parameters.

Usage

mcmccontrol(nsave = 8000, nburn = 2000, nskip = 1)

Arguments

nsave

An integer giving the total number of scans to be saved (does not include the burn-in and thinning iterations).

nburn

An integer giving the number of burn-in scans.

nskip

An integer giving the thinning interval,

Details

The value returned by this function is used as a control argument of the AROC.bnp, cROC.bnp, and pooledROC.dpm functions.

Value

A list with components for each of the possible arguments.

See Also

pooledROC.dpm, AROC.bnp and cROC.bnp

Examples

library(ROCnReg)
data(psa)
# Select the last measurement
newpsa <- psa[!duplicated(psa$id, fromLast = TRUE),]

# Log-transform the biomarker
newpsa$l_marker1 <- log(newpsa$marker1)

cROC_bnp <- cROC.bnp(formula.h = l_marker1 ~ f(age, K = 0),
               formula.d = l_marker1 ~ f(age, K = 0),
               group = "status", 
               tag.h = 0,
               data = newpsa,
               standardise = TRUE, 
               p = seq(0, 1, len = 101),
               compute.lpml = TRUE, 
               compute.WAIC = TRUE,
               compute.DIC = TRUE, 
               pauc = pauccontrol(compute = TRUE, value = 0.5, focus = "FPF"),
               density = densitycontrol(compute = TRUE, grid.h = NA, grid.d = NA),
               mcmc = mcmccontrol(nsave = 500, nburn = 100, nskip = 1))



ROCnReg documentation built on March 31, 2023, 5:42 p.m.