compute_posterior_sd_nn {GPCERF}R Documentation

Calculate posterior standard deviations for nnGP model

Description

Calculates the posterior standard deviation of a point on the CERF based on the nnGP model.

Usage

compute_posterior_sd_nn(
  hyperparam,
  w,
  gps_w,
  obs_ord,
  sigma2,
  kernel_fn = function(x) exp(-x^2),
  n_neighbor = 10,
  block_size = 10000
)

Arguments

hyperparam

The values of hyperparameters in the GP model.

w

The exposure level for the point of interest on the CERF.

gps_w

The GPS for all samples when their exposure levels are set at w.

obs_ord

A matrix of two columns. The first column is the observed exposure levels of all samples; the second is the GPS at the observed exposure levels. The rows are in ascending order for the first column.

sigma2

A scaler representing sigma^2.

kernel_fn

The covariance function of the GP.

n_neighbor

Number of nearest neighbors on one side.

block_size

Number of samples included in a computation block. Mainly used to balance the speed and memory requirement. Larger block_size is faster, but requires more memory.

Value

The posterior standard deviation of the estimated CERF at w.


[Package GPCERF version 0.2.4 Index]