block.Ord: Specify a Block Monotonic Shape-Restriction in a CSVY Formula

View source: R/csurvey.R

block.OrdR Documentation

Specify a Block Monotonic Shape-Restriction in a CSVY Formula

Description

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

Usage

  block.Ord(x, order = NULL, numknots = 0, knots = 0, space = "E")

Arguments

x

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

order

A 1 \times M vector defining the order of domains when the shape constraint is block ordering.

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".

Value

The vector x with five attributes, i.e., name: the name of x; shape: 9("block ordering"); numknots: the numknots argument in "block.Ord"; knots: the knots argument in "block.Ord"; space: the space argument in "block.Ord".

Author(s)

Xiyue Liao

See Also

csvy


csurvey documentation built on Sept. 24, 2023, 1:08 a.m.

Related to block.Ord in csurvey...