trim | R Documentation |
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 class 'gp'
trim(object, burn, thin = 1)
## S3 method for class 'gpvec'
trim(object, burn, thin = 1)
## S3 method for class 'dgp2'
trim(object, burn, thin = 1)
## S3 method for class 'dgp2vec'
trim(object, burn, thin = 1)
## S3 method for class 'dgp3'
trim(object, burn, thin = 1)
## S3 method for class 'dgp3vec'
trim(object, burn, thin = 1)
object |
object from |
burn |
integer specifying number of iterations to cut off as burn-in |
thin |
integer specifying amount of thinning ( |
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.
object of the same class with the selected iterations removed
# See ?fit_one_layer, ?fit_two_layer, or ?fit_three_layer
# for examples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.