Description Usage Arguments Details Value Author(s) See Also Examples

The emulator of the computer model and the Bayesian fit are used to produce samples from the posterior predictive distribution of the computer model and bias function evaluated at the new input points. Then, bias-corrected predictions of the response (reality) are produced by adding these two samples (model+bias).

1 2 3 4 5 6 7 8 | ```
## S4 method for signature 'SAVE'
predictreality(object, newdesign, n.burnin=0, n.thin=1, tol=1E-10, verbose=FALSE, ...)
## S4 method for signature 'predictreality.SAVE'
summary(object)
## S4 method for signature 'summary.predictreality.SAVE'
show(object)
``` |

`object` |
An object of the corresponding signature. |

`newdesign` |
A named matrix containing the points (controllable
inputs) where predictions are to be performed. Column names should contain
the |

`n.burnin` |
The burnin to be applied (see details below). |

`n.thin` |
The thinin to be applied (see details below). |

`tol` |
The tolerance in the Cholesky decomposition. |

`verbose` |
A |

`...` |
Extra arguments to be passed to the function (still not implemented). |

Draws from the posterior predictive distribution of the computer model and bias at a given set of controllable inputs are simulated using the MCMC sample from the posterior distribution of the parameters of the model stored in `object@mcmcsample`

. This sample can be thinned by
`n.thin`

and/or the first `n.burnin`

draws can be discarded.

A preliminary analysis of the resulting sample can be performed with `summary`

which provides point estimates and tolerance bounds of the predictions.

Returns an S4 object of class `predictreality.SAVE`

with the following slots:

`modelpred` |
A list with the simulations from the posterior distribution of the computer model output evaluated at the new design |

`biaspred ` |
A matrix with the simulations from the posterior distribution of the bias function evaluated at the new design. |

`newdesign ` |
A copy of the design given as argument. |

`predictrealitycall ` |
The call to the function. |

Jesus Palomo, Rui Paulo and Gonzalo Garcia-Donato.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ```
## Not run:
library(SAVE)
#############
# load data
#############
data(spotweldfield,package='SAVE')
data(spotweldmodel,package='SAVE')
##############
# create the SAVE object which describes the problem and
# compute the corresponding mle estimates
##############
gfsw <- SAVE(response.name="diameter", controllable.names=c("current", "load", "thickness"),
calibration.names="tuning", field.data=spotweldfield,
model.data=spotweldmodel, mean.formula=~1,
bestguess=list(tuning=4.0))
# summary of the results
summary(gfsw)
##############
# obtain the posterior distribution of the unknown parameters
##############
gfsw <- bayesfit(object=gfsw, prior=c(uniform("tuning", upper=8, lower=0.8)),
n.iter=20000, n.burnin=100, n.thin=2)
#########
# bias-corrected prediction at a set of inputs
# using predictreality
##########
load <- c(4.0,5.3)
curr <- seq(from=20,to=30,length=20)
g <- c(1,2)
xnew<- expand.grid(current = curr, load = load, thickness=g)
# Obtain samples
prsw <- predictreality(object=gfsw, newdesign=xnew, tol=1.E-12)
#Summarize the results:
summary(prsw)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.