Learn R Programming

DPCD (version 0.0.1)

makeDiagonalSigma: Create a diagonal covariance matrix

Description

A nimbleFunction that returns a diagonal matrix with diagonal entries equal to tau_sq_vec. This function is not intended to be called by users of the package directly.

Usage

makeDiagonalSigma(tau_sq_vec)

Value

A p x p spherical covariance matrix.

Arguments

tau_sq_vec

A vector of length p containing variance parameters for the covariance matrix.

See Also

nimbleFunction for information on nimbleFunctions.

Examples

Run this code
makeDiagonalSigma(tau_sq_vec = c(1, 2, 3))

Run the code above in your browser using DataLab