sampleData function

Sample data from the posterior (or prior) distribution.