getedf0: Get the Edf0 Vector for the Shape Routine

View source: R/shape.R

getedf0R Documentation

Get the Edf0 Vector for the Shape Routine

Description

An edf0 vector is the estimated "null expected degrees of freedom" for shapes allowed by the user. It is an input of the main routine "shape" and it is used to select the best shape for a scatterplot. See Meyer (2013a) and Meyer (2013b) for further details.

Usage

getedf0(x, flat = TRUE, dec = TRUE, jp = TRUE, invee = TRUE, 
vee = TRUE, inc = TRUE, db = TRUE, nsim = 1e+3, random = FALSE, msg = FALSE)

Arguments

x

A n by 1 predictor vector, for example, years.

flat

A logical flag. If it is TRUE, there is a flat shape choice; otherwise, there is no such a shape option.

dec

A logical flag. If it is TRUE, there is a decreasing shape choice; otherwise, there is no such a shape option.

jp

A logical flag. If it is TRUE, there is a one-jump shape choice; otherwise, there is no such a shape option.

invee

A logical flag. If it is TRUE, there is an inverted-vee shape choice; otherwise, there is no such a shape option.

vee

A logical flag. If it is TRUE, there is a vee shape choice; otherwise, there is no such a shape option.

inc

A logical flag. If it is TRUE, there is an increasing shape choice; otherwise, there is no such a shape option.

db

A logical flag. If it is TRUE, there is a double-jump option; otherwise, there is no such a shape option.

nsim

Number of simulations used to get the edf0 vector. The default is nsim = 1e+3.

random

A parameter used by the maintainer to test if each shape option can be both included and excluded.

msg

A logical flag. If msg is TRUE, then a warning message will be printed when there is a non-convergence problem; otherwise no warning message will be printed. The default is msg = FALSE

Details

Because the calculations for the edf0 vector for a given set of \bold{x} values (e.g., years) is time-consuming, this is accomplished in the subroutine "getedf0", and the edf0 vector is an input to the main routine "shape". In this way the edf0 values can be determined for one set of years and used for many scatterplots.

Value

The edf0 values for all shape options allowed by the user.

Author(s)

Mary C. Meyer and Xiyue Liao

References

Meyer, M. C. (2013a) Semi-parametric additive constrained regression. Journal of Nonparametric Statistics 25(3), 715

Meyer, M. C. (2013b) A simple new algorithm for quadratic programming with applications in statistics. Communications in Statistics 42(5), 1126–1139.

See Also

shape

Examples

## Not run: 
	# define the predictor vector: the year 1985 to the year 2010
	x <- 1985:2010

	# call the getedf0 routine without a double-jump option
	edf0 <- getedf0(x, db = FALSE)

## End(Not run)

ShapeSelectForest documentation built on Aug. 19, 2023, 5:11 p.m.