post_sample_no_discrepancy: Posterior sampling for the model with no discrepancy...

View source: R/functions.R

post_sample_no_discrepancyR Documentation

Posterior sampling for the model with no discrepancy function.


This function performs the posterior sampling for calibration parameters and other parameters in the model assuming no discrepancy function.


post_sample_no_discrepancy(input, output, R0_list,  p_theta, output_weights,
                                par_cur, theta_range,S,thinning, X, have_trend, 
                                alpha,sd_proposal, discrepancy_type, simul_type,emulator,
                                emulator_type, loc_index_emulator,



a matrix of observed inputs/design points of the experimental data.


a vector of experimental data.


a List of matrices where the j-th matrix is an absolute difference matrix of the j-th input vector.


number of calibration parameters.


a vector of the weights of the output.


current value of the posterior samples.


a matrix for the range of the calibration parameters. The first column is the lower bound and the second column is the upper bound of the calibration parameters.


number of MCMC to run.


the ratio between the number of posterior samples and the number of recorded samples.


a matrix for the basis of the mean discrepancy.


a bool value. It means the mean discrepancy is zero or not.


a vector of roughness parameters in the kernel functions. It is only useful if the power exponential correlation function is used.


a vector for the standard deviation of the proposal distribution.


A string for type of discrepancy funcation. It can be chosen from 'no-discrepancy', 'GaSP' or 'S-GaSP'.


tpye of math model. If the simul_type is 0, it means we use the RobustGaSP R package to emulate the math model. If the simul_type is 1, it means the function of the math model is given by the user. When simul_type is 2 or 3, the mathematical model is the geophyiscal model for Kilauea Volcano. If the simul_type is 2, it means it is for the ascending mode InSAR data; if the simul_type is 3, it means it is for the descending mode InSAR data.


an S4 class of rgasp model from the RobustGaSP R Package.


a character to specify the type of emulator. 'rgasp' is for computer models with scalar-valued output and 'ppgasp' for computer models with vectorized output.


a vector of the location index from the ppgasp emulator to output. Only useful for vectorized output computer model emulated by the ppgasp emulator.


a function for the math model to be calibrated.


Variance of the data. This term is useful when there are repeated experiments.


Total number of observations. If there is no repeated experiment, this is equal to the number of observable inputs.


A list. The first element is a matrix of the posterior samples after burn-in. The second element is a vector of posterior values after burn-in. The third element is the number of times of the proposed calibration parameters are accepted. The fourth element is the number of times the proposed samples of the calibration parameters are outside the range of the calibration parameters.


Mengyang Gu [aut, cre]

Maintainer: Mengyang Gu <>


A. O'Hagan and M. C. Kennedy (2001), Bayesian calibration of computer models, Journal of the Royal Statistical Society: Series B (Statistical Methodology, 63, 425-464.

Mengyang Gu. (2016). Robust Uncertainty Quantification and Scalable Computation for Computer Models with Massive Output. Ph.D. thesis. Duke University.

M. Gu and L. Wang (2017) Scaled Gaussian Stochastic Process for Computer Model Calibration and Prediction. arXiv preprint arXiv:1707.08215.

M. Gu (2018) Jointly Robust Prior for Gaussian Stochastic Process in Emulation, Calibration and Variable Selection . arXiv preprint arXiv:1804.09329.

RobustCalibration documentation built on Sept. 19, 2022, 1:06 a.m.