View source: R/compute_deriv_weights_gp.R
compute_deriv_weights_gp | R Documentation |
Calculates the weights assigned to each observed outcome when deriving the posterior mean of the first derivative of CERF at a given exposure level.
compute_deriv_weights_gp(
w,
w_obs,
gps_m,
hyperparam,
kernel_fn = function(x) exp(-x),
kernel_deriv_fn = function(x) -exp(-x)
)
w |
A scalar of exposure level of interest. |
w_obs |
A vector of observed exposure levels of all samples. |
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 FALSE |
hyperparam |
A vector of hyper-parameters in the GP model. |
kernel_fn |
The covariance function. |
kernel_deriv_fn |
The partial derivative of the covariance function. |
A vector of weights for all samples, based on which the posterior mean of the derivative of CERF at the exposure level of interest is calculated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.