Acts on a gp
, gpvec
, dgp2
, dgp2vec
,
dgp3vec
, or dgp3
object.
Removes the specified number of MCMC iterations (starting at the first
iteration). After these samples are removed, the remaining samples are
optionally thinned.
trim(object, burn, thin)# S3 method for gp
trim(object, burn, thin = 1)
# S3 method for gpvec
trim(object, burn, thin = 1)
# S3 method for dgp2
trim(object, burn, thin = 1)
# S3 method for dgp2vec
trim(object, burn, thin = 1)
# S3 method for dgp3
trim(object, burn, thin = 1)
# S3 method for dgp3vec
trim(object, burn, thin = 1)
object of the same class with the selected iterations removed
object from fit_one_layer
, fit_two_layer
, or
fit_three_layer
integer specifying number of iterations to cut off as burn-in
integer specifying amount of thinning (thin = 1
keeps all
iterations, thin = 2
keeps every other iteration,
thin = 10
keeps every tenth iteration, etc.)
The resulting object will have nmcmc
equal to the previous
nmcmc
minus burn
divided by thin
. It is
recommended to start an MCMC fit then investigate trace plots to assess
burn-in. Once burn-in has been achieved, use this function to remove
the starting iterations. Thinning reduces the size of the resulting
object while accounting for the high correlation between consecutive
iterations.
# See ?fit_one_layer, ?fit_two_layer, or ?fit_three_layer
# for examples
Run the code above in your browser using DataLab