Nothing
#' Create a covariance vector (used in prediction)
#'
#'
#' @param spcov_params Spatial covariance parameters
#' @param dist_vector Distance vector
#' @param randcov_vector Random effects vector
#' @param partition_vector Partition factor vector
#'
#' @return A covariance vector
#'
#' @noRd
cov_vector <- function(spcov_params, dist_vector, randcov_vector = NULL, partition_vector = NULL) {
# Vector analogue of cov_matrix(): used for kriging/prediction, where only the
# covariance between each prediction location and the observed data (not a full
# observed-by-observed matrix) is needed
# spatial
spcov_vector_val <- spcov_vector(spcov_params, dist_vector)
# random effects
if (!is.null(randcov_vector)) {
cov_vector_val <- spcov_vector_val + randcov_vector
} else {
cov_vector_val <- spcov_vector_val
}
# partitioning: zero out covariance for prediction/observation pairs that fall in
# different partitions, matching cov_matrix()'s partitioning behavior
if (!is.null(partition_vector)) {
cov_vector_val <- cov_vector_val * partition_vector
}
cov_vector_val
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.