estimate_mean_sd_nn {GPCERF} | R Documentation |
Estimates the posterior mean of the conditional exposure response function at specified exposure levels with nnGP.
estimate_mean_sd_nn(
hyperparam,
sigma2,
w_obs,
w,
y_obs,
gps_m,
kernel_fn = function(x) exp(-x^2),
n_neighbor = 50,
block_size = 2000,
nthread = 1
)
hyperparam |
A set of hyperparameters for the nnGP. |
sigma2 |
A scaler representing |
w_obs |
A vector of observed exposure levels. |
w |
A vector of exposure levels at which the CERF is estimated. |
y_obs |
A vector of observed outcome values. |
gps_m |
An S3 gps object including: gps: A data.frame of GPS vectors. - Column 1: GPS - Column 2: Prediction of exposure for covariate of each data sample (e_gps_pred). - Column 3: Standard deviation of e_gps (e_gps_std) used_params: - dnorm_log: TRUE or FLASE |
kernel_fn |
The covariance function of the GP. |
n_neighbor |
The number of nearest neighbors on one side. |
block_size |
The number of samples included in a computation block.
Mainly used to balance the speed and memory requirement. Larger
|
nthread |
An integer value that represents the number of threads to be used by internal packages. |
A vector of returned value from compute_posterior_sd_nn
.