make_oracle: Create oracle function for constrained polynomial fitting

Description Usage Arguments Value Examples

View source: R/make-oracle.R

Description

For use with cpm. See getting started vignette for details.

Usage

1
make_oracle(oracle, region = c(-Inf, Inf))

Arguments

oracle

oracle function, returns TRUE if point is in constrained region, FALSE otherwise.

region

region over which constraint is applied.

Value

function that returns TRUE if point satisfies oracle, FALSE otherwise.

Examples

1
2
3
4
5
## Not run: 
constraint_oracle <- make_oracle( function(b) { b[1,] > 1 })
# In general, variable b should be treated as a matrix.

## End(Not run)

bonStats/gcreg documentation built on May 20, 2019, 5:44 p.m.