NormalCirculant | R Documentation |
Provides methods for the Normal-Circulant (NCt) distribution, which for a random vector z
of length N
is defined as
z ~ NCt(uacf) <=> z ~ Normal(0, toeplitz(acf)),
where uacf
are the Nu = floor(N/2)+1
unique elements of the autocorrelation vector acf
, i.e.,
acf = (uacf, rev(uacf[2:(Nu-1)]), N even, = (uacf, rev(uacf[2:Nu])), N odd.
new()
Class constructor.
NormalCirculant$new(N)
N
Size of the NCt random vector.
A NormalCirculant
object.
size()
Get the size of the NCt random vector.
NormalCirculant$size()
Size of the NCt random vector.
logdens()
Log-density function.
NormalCirculant$logdens(z, uacf)
z
Density argument. A vector of length N
or an N x n_obs
matrix where each column is an N
-dimensional observation.
uacf
A vector of length Nu = floor(N/2)
containing the first half of the autocorrelation (i.e., first row/column) of the Circulant variance matrix.
A scalar or vector of length n_obs
containing the log-density of the NCt evaluated at its arguments.
grad_full()
Full gradient of log-density function.
NormalCirculant$grad_full(z, uacf, calc_dldz = TRUE, calc_dldu = TRUE)
z
Density argument. A vector of length N
.
uacf
A vector of length Nu = floor(N/2)
containing the first half of the autocorrelation (i.e., first row/column) of the Circulant variance matrix.
calc_dldz
Whether or not to calculate the gradient with respect to z
.
calc_dldu
Whether or not to calculate the gradient with respect to uacf
.
A list with elements:
ldens
The log-density evaluated at z
and uacf
.
dldz
The length-N
gradient vector with respect to z
, if calc_dldz = TRUE
.
dldu
The length-Nu = floor(N/2)+1
gradient vector with respect to uacf
, if calc_dldu = TRUE
.
clone()
The objects of this class are cloneable with this method.
NormalCirculant$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.