RFratiotest: Likelihood ratio test

Description Usage Arguments Details Value Methods Note Note Note See Also Examples

View source: R/Likelihoodratio.R

Description

The function performs an approximate chi2 test or a Monte Carlo likelihood ratio test based on fitgauss. Currently, it only works for Gaussian random fields.

Usage

1
2
3
4
5
RFratiotest(nullmodel, alternative, x, y = NULL, z = NULL, T = NULL,
            grid=NULL, data, alpha, n = 5 / alpha, seed = 0, 
            lower = NULL, upper = NULL, methods,
            sub.methods, optim.control = NULL, users.guess = NULL,
            distances = NULL, dim, transform = NULL, ...)

Arguments

nullmodel, alternative

See Details.

The set of parameters to be estimated for nullmodel should be a subset of the parameters to be estimated for alternative if alternative is given.

alpha

value in [0,1] or missing. Significance level.

n

integer. The test is based on n-1 simulations.

seed

integer. If not NULL and not NA, the .Random.seed is set to seed. Otherwise, set.seed is set to the value of RFoptions{}$basic$seed if the latter is not NA.

x \argX
y,z \argYz
T \argT
grid \argGrid
data \argData
lower \argLower
upper \argUpper
methods \argFitmethods
sub.methods \argFitsubmethods

See RFfit for details.

users.guess \argUsersguess
distances,dim \argDistances
optim.control \argOptimcontrol
transform \argTransform
... \argDots

Details

nullmodel (and the alternative) can be

RFratiotest tries to detect whether nullmodel is a submodel of alternative. If it fails,

Otherwise it is guaranteed that the alternative model has a (log) likelihood that is at least as large as that of the nullmodel.

Value

The test returns a message whether the null hypothesis, i.e. the smaller model is accepted. Invisibly, a list that also contains

It has S3 class "RFratiotest".

Methods

print

prints the summary

summary

gives a summary

Note

An important RFoptions is ratiotest_approx.

Note

Note that the likelihood ratio test may take a huge amount of time.

Note

This function does not depend on the value of RFoptions()$PracticalRange. The function RFratiotest always uses the standard specification of the covariance model as given in RMmodel.

See Also

RFfit, RMmodel, RandomFields, weather.

Examples

1


RandomFields documentation built on Jan. 19, 2022, 1:06 a.m.