backward_AIC: Backward Elimination on GEV Parameter based on AIC

Description Usage Arguments Details Value Examples

View source: R/backward_AIC.R

Description

Significance controlled variable selection selects variables in either mu, sigma, and xi with backward direction based on AIC.

Usage

1
2
3
4
5
6
7
backward_AIC(fit, do_mu = TRUE, do_sigma = FALSE, do_xi = FALSE)

backward_AIC_mu(fit)

backward_AIC_sigma(fit)

backward_AIC_xi(fit)

Arguments

fit

An object of class c("gev", "evreg") returned from gevreg summarising the current model fit.

do_mu

do backward selection on mu if do_mu equals TRUE. Default is TRUE.

do_sigma

do backward selection on sigma if do_sigma equals TRUE. Default is FALSE.

do_xi

do backward selection on xi if do_xi equals TRUE. Default is FALSE.

Details

Add details.

Value

An object (a list) of class c("gev", "evreg") summarising the new model fit (which may be the same as fit) and containing the following additional components

Input_fit

The input object of the class c("gev", "evreg").

Note

A message that tells if covariates have been dropped or not.

Output_fit

A list that contains formulae for the parameter, and the output object of the class c("gev", "evreg") if the output fit is different from the input fit.

dropped_covariate

A character vector shows dropped covariates

AIC

AIC values for both input model and output model if two models are different.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
### Oxford and Worthing annual maximum temperatures

ow$year <- (ow$year - 1901) / (1980 - 1901)
ow1 <- gevreg(y = temp, data = ow[-3], mu = ~loc + year, sigma = ~loc,
xi = ~loc, sigmalink = identity)
backward_AIC_mu(ow1)


### Annual Maximum and Minimum Temperature

P6 <- gevreg(TMX1, data = PORTw[,-1], mu = ~MTMAX + AOindex + STDTMAX + STDMIN + MDTR)
P7 <- gevreg(TMX1, data = PORTw[,-1], sigma = ~MTMAX + STDTMAX + STDMIN + MDTR)
P8 <- gevreg(TMX1, data = PORTw[,-1], xi = ~MTMAX + STDTMAX + STDMIN + MDTR)
backward_AIC_mu(P6)
backward_AIC_sigma(P7)
backward_AIC_xi(P8)

pengyuwei94/evreg documentation built on Aug. 29, 2019, 1:06 p.m.