decr: Specify a Decreasing Shape-Restriction in a CSVY Formula

Description Usage Arguments Details Value Author(s) References See Also

View source: R/csurvey.R

Description

A symbolic routine to define that a vector of domain means is decreasing in a predictor in a formula argument to csvy. This is the unsmoothed version.

Usage

1
decr(x, numknots = 0, knots = 0, space = "E")

Arguments

x

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

numknots

The number of knots used to smoothly constrain a predictor. The value should be 0 for a shape-restricted predictor without smoothing. The default value is 0.

knots

The knots used to smoothly constrain a predictor. The value should be 0 for a shape-restricted predictor without smoothing. The default value is 0.

space

A character specifying the method to create knots. It will not be used for a shape-restricted predictor without smoothing. The default value is "E".

Details

The subroutine "decr" is borrowed from the R package cgam. For now, the arguments numknots, knots, and space will not be used because only unsmoothed shape-constrained estimation is provided in this package.

"decr" is a helper function to create the constraint matrix used in csvy.

See references cited in this section for more details.

Value

The vector x with five attributes, i.e., name: the name of x; shape: 2("decreasing"); numknots: the numknots argument in "decr"; knots: the knots argument in "decr"; space: the space argument in "decr".

Author(s)

Xiyue Liao

References

Liao, X. and Meyer, M. C. (2019) cgam: An R Package for the Constrained Generalized Additive Model. Journal of Statistical Software 89(5).

See Also

decr, csvy


csurvey documentation built on May 17, 2021, 9:07 a.m.

Related to decr in csurvey...