umbrella: Specify an Umbrella-Ordering in a CGAM Formula

View source: R/cgam.R

umbrellaR Documentation

Specify an Umbrella-Ordering in a CGAM Formula

Description

A symbolic routine to define that the systematic component \eta has an umbrella-ordering in a predictor in a formula argument to cgam.

Usage

umbrella(x)

Arguments

x

A numeric vector which has the same length as the response vector.

Details

"umbrella" returns the vector "x" and imposes on it two attributes: name and shape.

The name attribute is used in the subroutine plotpersp; the shape attribute is "umbrella", and to the value of the vector itself and its shape attribute, the cone edges of the cone generated by the constraint matrix, which constrains that \eta has an umbrella-ordering in "x" will be made. The cone edges are a set of basis employed in the hinge algorithm.

Note that "umbrella" does not make the corresponding cone edges itself. It sets things up to a sub-routine called umbrella.fun in cgam which will make the cone edges. An umbrella-ordering is a partial ordering: Suppose we have a x_0 that is known to be a "mode" so that for x, y >= x_0, we have a binary relation between x and y if x <= y and for x, y <= x_0 we have the opposite binary relation if x <= y, but if x < x_0 and y > x_0, there is no such binary relation.

See references cited in this section for more details.

Value

The vector x with two attributes, i.e., name: the name of x; shape: "umbrella".

Author(s)

Mary C. Meyer and Xiyue Liao

References

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

See Also

tree

Examples

  # generate y
  set.seed(123)
  n <- 20
  x <- seq(-2, 2, length = n)
  y <- - x^2 + rnorm(n)

  # regress y on x under the umbrella-ordering restriction
  fit <- cgam(y ~ umbrella(x)) 

  # make a plot
  par(mar = c(4, 4, 1, 1))
  plot(x, y, cex = .7, ylab = "y")
  lines(x, fit$muhat, col = 2)
  legend("topleft", bty = "n", "umbrella-ordering fit", col = 2, lty = 1)

cgam documentation built on Aug. 10, 2023, 5:11 p.m.

Related to umbrella in cgam...