cnr {cpr} | R Documentation |
Control Net Reduction
Description
Run the Control Net Reduction Algorithm.
Usage
cnr(x, margin, n_polycoef = 20L, progress = c("cnr", "influence", "none"), ...)
Arguments
x |
a |
margin |
the margins to apply the CNR algorithm to. Passed to
|
n_polycoef |
the number of polynomial coefficients to use when assessing the influence of each internal knot. |
progress |
controls the level of progress messaging. |
... |
not currently used |
Details
cnr
runs the control net reduction algorithm.
keep
will keep the regression fit as part of the cnr\_cp
object
for models with up to and including keep fits. For example, if keep =
10
then the resulting cnr\_cnr
object will have the regression fit
stored in the first keep + 1
(zero internal knots, one internal knot,
..., keep
internal knots) cnr\_cp
objects in the list. The
limit on the number of stored regression fits is to keep memory usage down.
Value
A cpr_cnr
object. This is a list of cpr_cn
objects.
See Also
cn
for defining a control net,
influence_weights
for finding the influence of the internal
knots, cpr
for the uni-variable version, Control Polygon
Reduction.
vignette(topic = "cnr", package = "cpr")
Examples
acn <- cn(log10(pdg) ~ btensor(list(day, age)
, df = list(10, 8)
, bknots = list(c(-1, 1), c(44, 53)))
, data = spdg)
cnr0 <- cnr(acn)
cnr0
summary(cnr0)
plot(cnr0)