
Smooth composition coefficients across ordered categories
magCompSmooth.RdSpecifies how regression coefficients vary across ordered composition
categories. Smoothing requires ordered categories in magCompData.
Unspecified methods default to independent coefficient priors.
Arguments
- intercept
Smoothing for composition intercept coefficients: independent (
"none"), first-order ("rw1"), or second-order ("rw2") random-walk smoothing.- slope
Smoothing for each composition slope, with the same choices.
- loading
Loading smoothing. Only
"none"is implemented.- ordered
Ordering flag stored in this specification. When preparing a model, the category ordering recorded by
magCompData()determines whether smoothing is permitted. This flag does not order the data.- ...
Named block or response overrides. Each is a list containing
intercept,slope,loading, and/orordered, or a single method name applied to both intercept and slope. Conditional block names have the form"child|parent".
Details
RW1 penalizes adjacent coefficient differences; RW2 penalizes changes in those differences. In conditional blocks, smoothing acts separately within each parent's child-category sequence. It does not smooth across parents.
Global settings apply unless overridden by a named block or response entry.
An exact block name takes precedence over its response name. Smoothing
variances are fixed prior settings controlled by magCompPriors;
they are not sampled parameters. The technical guide's section on regression
coefficients and ordered-category smoothing gives the precision matrices;
see magComp-package.
Examples
magCompSmooth(intercept = "rw2", slope = "rw2")
magCompSmooth(dbh_class = list(intercept = "rw2", slope = "rw1"))