Learn R Programming

rsBayes (version 0.1.0)

predict.pheno: Function for prediction at new time points using pheno models.

Description

The function predict collects posterior predictive samples for a set of new time points given an object of class pheno.

Usage

# S3 method for pheno
predict(object, t.0, sub.sample, ...)

Arguments

object

an object of class pheno.

t.0

the vector of time points for which posterior predictive samples will be generated.

sub.sample

an optional list that specifies the samples to included in the composition sampling a non-Conjugate model. Valid tags are start, end, and thin. Given the value associated with the tags, the sample subset is selected using seq(as.integer(start), as.integer(end), by=as.integer(thin)). The default values are start=floor(0.5*n.samples), end=n.samples and thin=1.

...

See details for additional optional arguments.

Value

An object of class predict.pheno which is a list comprising:

p.predictive.samples

a matrix that holds the response variable posterior predictive samples where rows are time points corresponding to t.0.

p.predictive.quantiles

a matrix that holds quantiles of the response variable posterior predictive samples where rows are time points corresponding to t.0.

run.time

execution time reported using proc.time().

Details

The following optional arguments can be passed:

n.omp.threads which is a positive integer indicating the number of threads to use for SMP parallel processing. The package must be compiled for OpenMP support. For most Intel-based machines, we recommend setting n.omp.threads up to the number of hyperthreaded cores. Note, n.omp.threads > 1 might not work on some systems.

verbose which if TRUE, the progress of the sampler is printed to the screen. Otherwise, nothing is printed to the screen.

n.report which is the interval to report sampling progress.