Learn R Programming

SpatioTemporal (version 0.9.2)

get.params: Extract Parameters from a Vector

Description

Extracts parameters for the log-likelihood from a parameter vector and separates regression parameters and log-covariance parameters.

Usage

get.params(x, dimensions)

Arguments

x
A vector containing regression and log-covariance parameters. The ordering of the elements should be exactly that indicated by loglike.var.names.
dimensions
Information regarding parameter dimension, output from loglike.dim.

Value

  • Returns a list containing:
  • gammaA column matrix of regression coefficients for the spatio-temporal covariate(s).
  • alphaA list of column matrices. Each column matrix contains the regression coefficients for geographic covariates in the corresponding beta field.
  • range, sillVectors with the range and sill for each of the beta fields. These are back transformed assuming that x contained log range and sill.
  • phi.nuRange, sill and nugget for the residual fields. Back transformed assuming that x contained log parameters.

encoding

latin1

See Also

Used internally by loglike and simulateMesaData.

Examples

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

##Compute dimensions for the data structure
dim <- loglike.dim(mesa.data.model)

##Let's create random parameter vectors ...
x <- runif(dim$nparam.cov)
x.all <- runif(dim$nparam)

##... and pick them apart
get.params(x, dim)
get.params(x.all, dim)

Run the code above in your browser using DataLab