Slice_mc: Slice_mc

View source: R/Slice_mc.R

Slice_mcR Documentation

Slice_mc

Description

Monte-Carlo procedure

Usage

Slice_mc(x, y, n_iter = 1000, n_burnin = n_iter/2, threshold = min(y[y > 0]))

Arguments

x

numeric (required) a variable

y

numeric (required) the measured value for x

n_iter

numeric (with default value) number of total iterations (including burn in; default: 1000)

n_burnin

numeric (with default) length of burn in, i.e. number of iterations to discard at the beginning. Default is n_iter/2, that is, discarding the first half of the simulations.

threshold

numeric (with default) measured point below or equal to the threshold are rejected. Default is the minimum measured value.

Value

a list with the following elements

Element Type Description
⁠$x1⁠ numeric the new point
⁠$L⁠ numeric the left boundary of the slice
⁠$R⁠ numeric the right boundary of the slice

Examples

#TL example from RLumModel
require(RLumModel)
data("ExampleData.ModelOutput", envir = environment())
TL_curve <- get_RLum(model.output, recordType = "TL$", drop = FALSE)
x<-TL_curve$data[,1]
y<-TL_curve$data[,2]
if (dev.cur()!=1) dev.off()
Slice_mc(x,y,n_iter=1000,n_burnin=500)



Zink-Antoine/Slice_sampler documentation built on Feb. 27, 2025, 9:23 p.m.