pcme.entropy {pcme}R Documentation

Compute entropy and its derivatives

Description

Compute the entropy of a periodically correlated time series model and its derivatives with respect to unknown autocovariances.

Usage

sigma2.to.ent(sigma2)
sigma2.to.entgrad(sigma2, gradsigma2)
sigma2.to.enthess(sigma2, gradsigma2, grad2sigma2)
mynorm(x)

Arguments

sigma2 vector of forward prediction variances.
gradsigma2 gradient of forward prediction variances.
grad2sigma2 Hessian matrix of forward prediction variances.
x a numeric vector of prediction variances.

Value

for sigma2.to.ent the entropy, a numeric scalar.
for sigma2.to.entgrad the gradient of the entropy, a numeric vector.
for sigma2.to.enthess the Hessian of the entropy, a matrix.

Author(s)

Sophie Lambert-Lacroix

References

Boshnakov, Georgi and Lambert-Lacroix, Sophie (2009?) Maximum entropy for periodically correlated processes from nonconsecutive autocovariance coefficients. J. Time Series Anal. (to appear)

Examples

sigma2.to.ent(c(1,0.50,0.8))   # -0.3054302
sum(log(c(1,0.50,0.8)))/3  # same

##ex From myhessian.r
R <- matrix(c(1,1,2,0.9,0.8,0.7,0.4,0.5,0.6,0.9,0.9,0.9),nrow=3)
Tau <- matrix(c(1,1,1,0,1,0,1,0,2,1,2,2),nrow=3)
R[,1]<-R[,1]+1
LD(R,Tau)

res <- LDhessian(R,Tau)

sigma2.to.ent(res$sigma2f)
sigma2.to.entgrad(res$sigma2f,res$gradsigma2f)

H <- sigma2.to.enthess(res$sigma2f,res$gradsigma2f,res$grad2sigma2f)
det(-H)

[Package pcme version 0.51 Index]