proflik {geoR} | R 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 |
geodata |
a list containing elements |
coords |
an |
data |
a vector with data values. By default it takes the
element |
sill.values |
set of values of the partial sill parameter
|
range.values |
set of values of the range parameter
|
nugget.values |
set of values of the nugget parameter
|
nugget.rel.values |
set of values of the relative nugget parameter
|
lambda.values |
set of values of the Box-Cox transformation parameter
|
sillrange.values |
logical indicating
whether or not the 2-D profile likelihood should be computed.
Only valid if |
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
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 theminimisation.function
argument. See documentation of the functionsoptim
and/ornlm
for further details.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.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)