View source: R/plausibility_contour.R
plausibility_contour | R Documentation |
This function provides the plausibility contour for Y(s0)
,
given observations s
and Y
,
using spatial conformal prediction algorithms.
plausibility_contour( s0, s, Y, global = TRUE, eta = Inf, m = NULL, pred_fun = krige_pred, thetaHat = NULL, dfun = c("residual2", "std_residual2"), precision = NULL )
s0 |
prediction location, a numeric vector with |
s |
an n x 2 |
Y |
a vector with n values corresponding to |
global |
logical; if |
eta |
kernel bandwidth for weight schema, a positve scalar with smaller value meaning more localized procedure.
Defauls to |
m |
an postive integer representing the number of nearest locations to use for prediction.
Default to |
pred_fun |
spatial prediction function with inputs being |
thetaHat |
a vector of Matern parameters, representing nugget, partial sill, range, and smoothness as in Mao. et al. (2020).
Defaults to |
dfun |
non-conformity measure with four options.
In which, |
precision |
a positive scalar represents how dense |
The output is a “plausibility_contour” object.
Huiying Mao, hmao@samsi.info, Brian Reich bjreich@ncsu.edu
to be entered
plausibility
## generate plausibility contour for Y(s0), where s0 = c(0.5,0.5), using sample data #?sample_data s0 = c(0.5,0.5) s = sample_data$s Y = sample_data$Y pc = plausibility_contour(s0=s0,s=s,Y=Y) plot(pc) idx = which(s[, 1] == s0[1] & s[, 2] == s0[2]) abline(v = Y[idx], col = "red", lty = 2) legend("topright", col=1:2, lty=1:2, c("plausibility", "true value"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.