read.posterior: read.posterior: function to read a posterior distribution of...

Description Usage Arguments Examples

View source: R/read.posterior.R

Description

This function returns list of each step from a MCMC sampling distribution

Usage

1
read.posterior(posterior.file, format, burnin)

Arguments

posterior.file

path to the posterior samples file (header == T)

format

specify whether the file is "csv" (comma seperared) or "tab" (tab delimited)

burnin

specify a proportion of samples to remove as burnin [0,1]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# Read MCMC sample from tab-delimited file
MCMC.samples <- read.posterior(posterior.file = '~/Desktop/GppFST_Tutorial/atrox_snap_gamma.log', format = "tab", burnin = .95)
[1] "Removing the first 381 posterior samples as burn-in"
[1] "Leaving 20 steps for Fst simulations/analyses"

MCMC.samples[1:2,1:8]  # Look at the first two MCMC steps for the first 8 columns
Sample posterior likelihood     prior    theta0     theta1     theta2 TreeHeightLogger
	382 381000 -214844.6  -214827.1 -17.56937  0.2060823 0.05711522  0.06334359      0.005438821
	383 382000 -214846.3  -214827.2 -19.05971  0.2108340 0.06029055  0.06172205      0.005967549

## End(Not run)

radamsRHA/GppFst documentation built on Nov. 9, 2019, 7:08 p.m.