proflik: Computes Profile Likelihoods

proflikR Documentation

Computes Profile Likelihoods

Description

Computes profile likelihoods for model parameters previously estimated using the function likfit.

Usage

proflik(obj.likfit, geodata, coords = geodata$coords,
        data = geodata$data, sill.values, range.values,
        nugget.values, nugget.rel.values, lambda.values, 
        sillrange.values = TRUE, sillnugget.values = TRUE,
        rangenugget.values = TRUE, sillnugget.rel.values = FALSE,
        rangenugget.rel.values = FALSE, silllambda.values = FALSE,
        rangelambda.values = TRUE,  nuggetlambda.values = FALSE,
        nugget.rellambda.values = FALSE,
        uni.only = TRUE, bi.only = FALSE, messages, ...)

Arguments

obj.likfit

an object of the class likfit, typically an output of the function likfit.

geodata

a list containing elements coords and data described next. Typically an object of the class "geodata" - a geoR data-set. If not provided the arguments coords and data must be provided instead.

coords

an n x 2 matrix containing in each row Euclidean coordinates of the n data locations. By default it takes the element coords of the argument geodata.

data

a vector with data values. By default it takes the element data of the argument geodata.

sill.values

set of values of the partial sill parameter sigma^2 for which the profile likelihood will be computed.

range.values

set of values of the range parameter phi for which the profile likelihood will be computed.

nugget.values

set of values of the nugget parameter tau^2 for which the profile likelihood will be computed. Only used if the model was fitted using the function likfit with the option fix.nugget = FALSE.

nugget.rel.values

set of values of the relative nugget parameter tauR^2 for which the profile likelihood will be computed. Only used if the model was fitted using the function likfit with the option fix.nugget = FALSE.

lambda.values

set of values of the Box-Cox transformation parameter lambda for which the profile likelihood will be computed. Only to be used if the model was fitted using the function likfit with the option fix.lambda = FALSE.

sillrange.values

logical indicating whether or not the 2-D profile likelihood should be computed. Only valid if uni.only = FALSE.

sillnugget.values

as above.

rangenugget.values

as above.

sillnugget.rel.values

as above.

rangenugget.rel.values

as above.

silllambda.values

as above.

rangelambda.values

as above.

nuggetlambda.values

as above.

nugget.rellambda.values

as above.

uni.only

as above.

bi.only

as above.

messages

logical. Indicates whether status messages should be printed on the screen (i.e. current output device) while the function is running.

...

additional parameters to be passed to the minimization function.

Details

The functions .proflik.* are auxiliary functions used to compute the profile likelihoods. These functions are internally called by the minimization functions when estimating the model parameters.

Value

An object of the class "proflik" which is a list. Each element contains values of a parameter (or a pair of parameters for 2-D profiles) and the corresponding value of the profile likelihood. The components of the output will vary according to the input options.

Note

  1. Profile likelihoods for Gaussian Random Fields are usually uni-modal. Unusual or jagged shapes can be due to the lack of the convergence in the numerical minimization for particular values of the parameter(s). If this is the case it might be necessary to pass control arguments to the minimization functions using the argument .... It's also advisable to try the different options for the minimisation.function argument. See documentation of the functions optim and/or nlm for further details.

  2. 2-D profiles can be computed by setting the argument uni.only = FALSE. However, before computing 2-D profiles be sure they are really necessary. Their computation can be time demanding since it is performed on a grid determined by the cross-product of the values defining the 1-D profiles.

  3. There is no "default strategy" to find reasonable values for the x-axis. They must be found in a "try-and-error" exercise. It's recommended to use short sequences in the initial attempts. The EXAMPLE section below illustrates this.

Author(s)

Paulo Justiniano Ribeiro Jr. paulojus@leg.ufpr.br,
Peter J. Diggle p.diggle@lancaster.ac.uk.

References

Further information on the package geoR can be found at:
http://www.leg.ufpr.br/geoR/.

See Also

plot.proflik for graphical output, likfit for the parameter estimation, optim and nlm for further details about the minimization functions.

Examples

op <- par(no.readonly=TRUE)
ml <- likfit(s100, ini=c(.5, .5), fix.nug=TRUE)
## a first atempt to find reasonable values for the x-axis:
prof <- proflik(ml, s100, sill.values=seq(0.5, 1.5, l=4),
                range.val=seq(0.1, .5, l=4))
par(mfrow=c(1,2))
plot(prof)
## a nicer setting 
## Not run: 
prof <- proflik(ml, s100, sill.values=seq(0.45, 2, l=11),
                range.val=seq(0.1, .55, l=11))
plot(prof)
## to include 2-D profiles use:
## (commented because this is time demanding)
#prof <- proflik(ml, s100, sill.values=seq(0.45, 2, l=11),
#                range.val=seq(0.1, .55, l=11), uni.only=FALSE)
#par(mfrow=c(2,2))
#plot(prof, nlevels=16)

## End(Not run)
par(op)

geoR documentation built on Aug. 9, 2022, 5:11 p.m.

Related to proflik in geoR...