A symbolic routine to define that the systematic component η has an umbrella-ordering in a predictor in a formula argument to cgam.
A numeric vector which has the same length as the response vector.
"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 η 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.
The vector x with two attributes, i.e., name: the name of x; shape: "umbrella".
Mary C. Meyer and Xiyue Liao
Meyer, M. C. (2013b) A simple new algorithm for quadratic programming with applications in statistics. Communications in Statistics 42(5), 1126–1139.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.