a helper function to tidy up the pi-traces that come out of the mcmc functions
This makes a tidy data frame of stuff, and also changes things back to factors, if the levels are provided.
tidy_pi_traces(input, pname, car_tib, interval)
input
: The output to tidy (i.e.. outpi)pname
: the name that you want the parameter to be called in the outputcar_tib
: a tibble with repunit and collection in the order they appear in the outputinterval
: the thinning interval that was usedUseful links