CppLHS {clhs}R Documentation

This is the internal Cpp function used to run the metropolis hasting algorithm if use.cpp = T. In general, it shouldn't be used as a stand alone function, because some preprocessing is done in R

Description

This is the internal Cpp function used to run the metropolis hasting algorithm if use.cpp = T. In general, it shouldn't be used as a stand alone function, because some preprocessing is done in R

Arguments

xA

matrix of data - must be numeric (factors are converted to numeric in R)

cost

cost vector (0 if no cost)

strata

matrix of continuous strata

include

matrix of included data

idx

integer vector of rows from which sampling is allowed

factors

boolean factor flag

i_fact

indices of factors in xA

nsample

number of samples

cost_mode

bool cost flag

iter

number of iterations

wCont

continuous weight

wFact

factor weights

wCorr

correlation weights

etaMat

eta matrix - either all 1, or user input

temperature

initial temperature

tdecrease

temperature decrease every length_cycle iterations

length_cycle

number of iterations between temperature decrease

Value

list with sampled data, indices, objective values, cost value, and final continuous weights for each sample


[Package clhs version 0.9.0 Index]