Wald test for likfit objects.

Description

A quick function to perform wald tests of likfit objects.

Usage

1
likfit_wald(object, probs = NULL, terms = NULL, levels = NULL, factor = NULL)

Arguments

object

Result from a likfit based function. Must be of class likGRF.

probs

Result from likfit_prob. Must be specified if factor!=NULL. Default is NULL.

terms

An index indicating variable to be included. Equivalent to Terms in wald.test. Default is NULL.

levels

An index indicating variable to be compared. Equivalent to L in wald.test. Default is NULL.

factor

A character string which represents the factor string of names in the probs argument. Default is NULL.

Details

A wrapping function of the wald.test function.
If only object is specified the function uses terms=1:length(object$beta)

See Also

wald.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
data(meuse)
temp <- na.omit(meuse)
geoData <- as.geodata(temp,coords.col=1:2,data.col=5, covar.col = c(3:4,6:13))
formula. <- "~elev+soil+lime+om+soil+dist+landuse"

fullModel <- likfit_step(geodata=geoData,
                          formula=formula.,
                          ini.=c(0.3,100),
                          nugget=0.01,
                          lambda=0,
                          fix.lambda=FALSE,
                          fix.nugget=FALSE,
                          lik.method="RML",
                          noBackSelection=TRUE,
                          useRcpp=TRUE)
# Perform a wald test on all.
likfit_wald(fullModel[[3]])
# Perform a wald test on landuse.                          
likfit_wald(fullModel[[3]],probs=fullModel[[2]], factor="landuse")
#Perform a wald test on specific covariates
likfit_wald(fullModel[[3]], terms=1:5)
#Perform a wald test on specific levels of a factor. 
l= t(rep(0,length(fullModel[[3]]$beta)))
l[8] = -1
l[9] = 1
likfit_wald(fullModel[[3]], levels=l)