Learn R Programming

PrevMap (version 1.5.4)

shape.matern: Profile likelihood for the shape parameter of the Matern covariance function

Description

This function plots the profile likelihood for the shape parameter of the Matern covariance function used in the linear Gaussian model. It also computes confidence intervals of coverage coverage by interpolating the profile likelihood with a spline and using the asymptotic distribution of a chi-squared with one degree of freedom.

Usage

shape.matern(
  formula,
  coords,
  data,
  set.kappa,
  fixed.rel.nugget = NULL,
  start.par,
  coverage = NULL,
  plot.profile = TRUE,
  messages = TRUE
)

Arguments

formula

an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted.

coords

an object of class formula indicating the geographic coordinates.

data

a data frame containing the variables in the model.

set.kappa

a vector indicating the set values for evluation of the profile likelihood.

fixed.rel.nugget

a value for the relative variance nu2 of the nugget effect, that is then treated as fixed. Default is NULL.

start.par

starting values for the scale parameter phi and the relative variance of the nugget effect nu2; if fixed.rel.nugget is provided, then a starting value for phi only should be provided.

coverage

a value between 0 and 1 indicating the coverage of the confidence interval based on the interpolated profile liklelihood for the shape parameter. Default is coverage=NULL and no confidence interval is then computed.

plot.profile

logical; if TRUE the computed profile-likelihood is plotted together with the interpolating spline.

messages

logical; if messages=TRUE then status messages are printed on the screen (or output device) while the function is running. Default is messages=TRUE.

Value

The function returns an object of class 'shape.matern' that is a list with the following components

set.kappa set of values of the shape parameter used to evaluate the profile-likelihood.

val.kappa values of the profile likelihood.

If a value for coverage is specified, the list also contains lower, upper and kappa.hat that correspond to the lower and upper limits of the confidence interval, and the maximum likelihood estimate for the shape parameter, respectively.