compute_post_fun_sgp {BayesGP}R Documentation

Computing the posterior samples of the function using the posterior samples of the basis coefficients for sGP

Description

Computing the posterior samples of the function using the posterior samples of the basis coefficients for sGP

Usage

compute_post_fun_sgp(
  samps,
  global_samps = NULL,
  k,
  refined_x,
  a,
  region,
  boundary = TRUE,
  m,
  intercept_samps = NULL,
  initial_location = NULL
)

Arguments

samps

A matrix that consists of posterior samples for the O-spline basis coefficients. Each column represents a particular sample of coefficients, and each row is associated with one basis function. This can be extracted using 'sample_marginal' function from 'aghq' package.

global_samps

A matrix that consists of posterior samples for the global basis coefficients. If NULL, assume there will be no global polynomials and the boundary conditions are exactly zero.

k

The number of the sB basis.

refined_x

A vector of locations to evaluate the sB basis

a

The frequency of sGP.

region

The region to define the sB basis

boundary

A boolean variable to indicate whether the boundary condition should be considered in the prediction.

m

The number of harmonics to consider

intercept_samps

A matrix that consists of posterior samples for the intercept parameter. If NULL, assume there is no intercept samples to adjust.

initial_location

The initial location of the sGP.

Value

A data.frame that contains different samples of the function, with the first column being the locations of evaluations x = refined_x.


[Package BayesGP version 0.1.3 Index]