likfit_step: Backward elimination using likfit.

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

View source: R/likfit_step.R

Description

Backward elimination using the geoR likfit function.

Usage

1
likfit_step(geodata, formula, ini., ..., noBackSelection = FALSE, useRcpp = TRUE)

Arguments

geodata
formula

Character string of the model to be run. If noBackSelection=FALSE this specifies the full model.

ini.

Initial estimates of the model. See likfit for more information.

...

Additional arguments to be sent to the likfit function.

noBackSelection

Indicates if backward elimination should be used.

useRcpp

Should the Rcpp version of the likfit function be used.

Details

The backward elimination is based on the significance of each model variable. It drops the least significant variable each step if it is non-significant. For variables which are factors all levels must be non-signiificant to be droped.

Value

formula

The final formula of the model.

probs

The t-probablities of the final model. See likfit_prob for more information.

likfit_model

The final model.See likfit for more information.

Author(s)

Jason Lessels

References

This is based on the geoR package. Please use citation(package="geoR") for information on the underlying function.

See Also

likfit

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)

bestModel <- 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=FALSE,
                          useRcpp=TRUE)

geoRExtended documentation built on May 2, 2019, 6:14 p.m.