Description Usage Arguments Value Warning Author(s) See Also Examples
Computes the log-likelihood for the spatio-temporal model. loglikeST
uses an optimised version of the log-likelihood, while loglikeSTnaive
uses the naive (slow) version and is included mainly for testing and speed
checks.
1 2 3 |
x |
Point at which to compute the log-likelihood, should be only
log-covariance parameters if |
STmodel |
|
type |
A single character indicating the type of log-likelihood to compute. Valid options are "f", "p", and "r", for full, profile or restricted maximum likelihood (REML). |
x.fixed |
Parameters to keep fixed, |
Returns the log-likelihood of the spatio temporal model.
loglikeSTnaive may take long to run. However for
some problems with many locations and short time series
loglikeSTnaive could be faster than loglikeST.
Johan Lindstrom
Other STmodel functions: createCV,
createDataMatrix,
createSTmodel,
dropObservations,
estimateBetaFields,
loglikeSTdim, predictNaive,
processLUR, processLocation,
updateCovf,
updateTrend.STdata
Other likelihood functions: loglikeSTGrad
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ##load the data
data(mesa.model)
##Compute dimensions for the data structure
dim <- loglikeSTdim(mesa.model)
##Find out in which order parameters should be given
loglikeST(NULL, mesa.model)
##Let's create random vectors of values
x <- runif( dim$nparam.cov )
x.all <- runif( dim$nparam )
##Evaluate the log-likelihood for these values
loglikeST(x.all, mesa.model, "f")
loglikeST(x, mesa.model, "p")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.