fitCov: Covariance parameter estimation

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The function estimates the (hyper)parameters of a list of covariance models 'models' by the Restricted Maximum Likelihood (REML) estimation method.

Usage

1
2
fitCov(models, Xs, data, control = list(), cl = NULL, pl = 0L,
  verbose = FALSE)

Arguments

models

object either of class krige, a list of covariance models or an object of class covModel (a single covariance model)

Xs

matrix of sample points (design points)

data

data frame of simulated sample means of statistics first column corresponds to the first model in the list 'models' and so forth

control

list of control parameters, see nloptr

cl

cluster object, NULL (default), of class "MPIcluster", "SOCKcluster", "cluster"

pl

integer, print level pl=0 (default)

verbose

logical, FALSE (default) for intermediate output

Details

The function fits a list of covariance models using the REML method. In order to avoid singularities of the so-called trend matrices make sure to use at least the minimum required number of sample points given by 'Xs' which depends on trend order, see setCovModel. THe use is given an advice if the trend order does not match the required number of (initial) design points.

Value

An object of class reml which consists of a list of named lists (of elements 'model' and 'convergence') each storing a fitted covariance model together with optimization results from a call to nloptr as an attribute named 'optres' if verbose=TRUE. The default method for estimation is mlsl which uses random starting points and thus produces different results if it is run more than onces. If the results strongly vary, then the corresponding REML function might have many local minima which precludes the use of this default algorithm and another one, e.g. 'NLOPT_GN_DIRECT' (see nloptr.print.options), might lead to better results.

Author(s)

M. Baaske

See Also

setCovModel

Examples

1
2
3
4
5
6
7
data(normal)  

# fit 1st statistic and get REML results
fitCov(qsd$covT[1],
       Xs=as.matrix(qsd$qldata[1:2]),
       data=qsd$qldata["mean.T1"],verbose=TRUE)
  

qle documentation built on May 2, 2019, 5:26 p.m.