Learn R Programming

SpatioTemporal (version 0.9.2)

loglike.var.names: Create Names for Log-likelihood Parameters

Description

Function that creates a character vector with names for the parameters expected by log-likelihood functions. Names are created by extracting names from the mesa.data.model structure, which in turn is derived from mesa.data by create.data.model.

Usage

loglike.var.names(mesa.data.model, all = TRUE)

Arguments

mesa.data.model
Data structure holding observations, and information regarding which geographic and spatio-temporal covariates to use when fitting the model. See create.data.model and
all
If TRUE returns names for all parameters (regression parameters followed by log-covariance parameters), otherwise return only names for the log-covariance parameters.

Value

  • Returns names of the parameters expected by the log-likelihood functions. Returns either names of all parameters, or just names of the log-covariance parameters.

encoding

latin1

Details

The parameter names for the regression parameters are created by combining "gamma" with dimnames(mesa.data$SpatioTemp)[[3]] for the spatio-temporal covariates and by combining "alpha", colnames(mesa.data$trend) and colnames(mesa.data$LUR) for the geographic covariates. Using both the names of the temporal trends and the geographic covariates allows us to seperate regression parameters for the different temporal trends. Of course only covariates included in mesa.data.model by create.data.model are used when creating the names.

For the log-covariance parameters the names are generated by combining "log.range" or "log.sill" with colnames(mesa.data$trend) (or "nu" for the residual field).

See Also

See the functions loglike, loglike.grad, loglike.hessian, loglike.dim, and simulateMesaData. See also the data strutures mesa.data and mesa.data.model. For optimization functions see create.data.model, run.MCMC, fit.mesa.model, and cond.expectation.

Examples

Run this code
##load the data
data(mesa.data.model)
data(mesa.data)

##Find out in which order parameters should be given
loglike.var.names(mesa.data.model)

##...and for only the covariance parameters.
loglike.var.names(mesa.data.model, all = FALSE)

##Including a spatio-temporal covariate
loglike.var.names( create.data.model(mesa.data) )

Run the code above in your browser using DataLab