| NormalCirculant {SuperGauss} | R Documentation |
Multivariate normal with Circulant variance matrix.
Description
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.
Methods
Public methods
Method new()
Class constructor.
Usage
NormalCirculant$new(N)
Arguments
NSize of the NCt random vector.
Returns
A NormalCirculant object.
Method size()
Get the size of the NCt random vector.
Usage
NormalCirculant$size()
Returns
Size of the NCt random vector.
Method logdens()
Log-density function.
Usage
NormalCirculant$logdens(z, uacf)
Arguments
zDensity argument. A vector of length
Nor anN x n_obsmatrix where each column is anN-dimensional observation.uacfA vector of length
Nu = floor(N/2)containing the first half of the autocorrelation (i.e., first row/column) of the Circulant variance matrix.
Returns
A scalar or vector of length n_obs containing the log-density of the NCt evaluated at its arguments.
Method grad_full()
Full gradient of log-density function.
Usage
NormalCirculant$grad_full(z, uacf, calc_dldz = TRUE, calc_dldu = TRUE)
Arguments
zDensity argument. A vector of length
N.uacfA 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_dldzWhether or not to calculate the gradient with respect to
z.calc_dlduWhether or not to calculate the gradient with respect to
uacf.
Returns
A list with elements:
ldensThe log-density evaluated at
zanduacf.dldzThe length-
Ngradient vector with respect toz, ifcalc_dldz = TRUE.dlduThe length-
Nu = floor(N/2)+1gradient vector with respect touacf, ifcalc_dldu = TRUE.
Method clone()
The objects of this class are cloneable with this method.
Usage
NormalCirculant$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.