View source: R/Brisc_Variogram.CI.R
BRISC_variogram.ci | R Documentation |
The function BRISC_variogram.ci
plots estimated Variogram and associated confience region.
BRISC_variogram.ci
uses the parameter estimates from BRISC_estimation
and associated confidence interval from BRISC_bootstrap
.
BRISC_variogram.ci(BRISC_Out, confidence_est, plot.variogram = FALSE)
BRISC_Out |
an object of class |
confidence_est |
bootstrp sample of the Theta parameters, obtained from |
plot.variogram |
if |
A list comprising of the following:
variogram |
variogram and associated confidence region corresponding to lag ranging from 0 to 20, evaluated at 0.01 frequency. |
Plot |
plots the Variogram and associated confidence region with legends. |
Arkajyoti Saha arkajyotisaha93@gmail.com,
Abhirup Datta abhidatta@jhu.edu
rmvn <- function(n, mu = 0, V = matrix(1)){ p <- length(mu) if(any(is.na(match(dim(V),p)))) stop("Dimension not right!") D <- chol(V) t(matrix(rnorm(n*p), ncol=p)%*%D + rep(mu,rep(n,p))) } set.seed(1) n <- 300 coords <- cbind(runif(n,0,1), runif(n,0,1)) beta <- c(1,5) x <- cbind(rnorm(n), rnorm(n)) sigma.sq = 1 phi = 5 tau.sq = 0.1 B <- as.matrix(beta) D <- as.matrix(dist(coords)) R <- exp(-phi*D) w <- rmvn(1, rep(0,n), sigma.sq*R) y <- rnorm(n, x%*%B + w, sqrt(tau.sq)) estimation_result <- BRISC_estimation(coords, y, x) bootstrap_result <- BRISC_bootstrap(estimation_result, n_boot = 10) varg <- BRISC_variogram.ci(estimation_result, bootstrap_result$boot.Theta, plot.variogram = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.