Calculates the log prior density of a spectral GP object as the log prior density of the basis coefficients, based on the prior variances and a prior of independent Gaussians.

1 2 | ```
## S3 method for class 'gp'
logdensity(object,...)
``` |

`object` |
A GP object, created by |

`...` |
Other arguments. |

The log density is calculated based on the real and imaginary components of the basis function coefficients, but only those coefficients that are not determined as the complex conjugates of other coefficients. The density function is that the coefficients are IID normal with mean zero and prior variance based on the spectral density and correlation parameters.

The logarithm of the prior density.

Christopher Paciorek paciorek@alumni.cmu.edu

Type 'citation("spectralGP")' for references.

`gp`

, `propose.coeff.gp`

, `calc.variances.gp`

1 2 3 4 5 6 7 | ```
library(spectralGP)
gp1=gp(128,matern.specdens,c(1,4))
gp2=gp(c(64,64),matern.specdens,c(1,4))
propose.coeff(gp1)
propose.coeff(gp2)
print(logdensity(gp1))
print(logdensity(gp2))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.