#' trim univariate gibbs output
#'
#' This function is part of post processing function
#' @param Out: Output of Zmix
#' @param nEnd: How many iterations to KEEP? (i.e. end size)
#' @keywords trim, mcmc
#' @export
#' @examples
#' #NA
trimit<-function(Out=Out, nEnd=EndSize){
yo<-length(Out$Bigmu) #number of chains
nmax<-length(Out$Loglike)
mu<-Out$Bigmu[[yo]][c(nmax-nEnd+1):nmax,]
sig<-Out$Bigsigma[[yo]][c(nmax-nEnd+1):nmax,]
ps<-Out$Bigp[[yo]][c(nmax-nEnd+1):nmax,]
Loglike<-Out$Loglike[c(nmax-nEnd+1):nmax]
zs<-Out$Zs[[yo]][,c(nmax-nEnd+1):nmax]
SteadyScore<-Out$SteadyScore$K0[c(nmax-nEnd+1):nmax]
list(Mu = mu,Sig=sig, Ps = ps, Loglike=Loglike, SteadyScore=SteadyScore, Zs=zs, YZ=Out$YZ)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.