forward_p: Forward Selection on GEV Parameter using individual p value...

Description Usage Arguments Details Value Examples

View source: R/forward_pvalue.R

Description

Significance controlled variable selection selects variables in either mu, sigma, and xi with forward direction based on individual p value from Wald test.

Usage

1
2
3
4
5
6
7
8
forward_p(fit, alpha = 0.05, do_mu = TRUE, do_sigma = FALSE,
  do_xi = FALSE)

forward_p_mu(fit, alpha = 0.05)

forward_p_sigma(fit, alpha = 0.05)

forward_p_xi(fit, alpha = 0.05)

Arguments

fit

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

alpha

Significance level. Default value is 0.05.

do_mu

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

do_sigma

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

do_xi

do forward 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 a covariate has been added 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.

added_covariate

A character vector shows added covariates

pvalue

A data frame that contains p values with five decimal places of the added covariates if there are some.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
### Fremantle sea levels

f0 <- gevreg(SeaLevel, data = evreg::fremantle)
forward_p_mu(f0)


### Annual Maximum and Minimum Temperature

P0 <- gevreg(y = TMX1, data = PORTw[, -1])
forward_p(P0)

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