
Model notation and software parameter names
magCompNotation.RdConnects the mathematical notation used in the manuscript and technical document to the package's prior settings, starting values, and sample labels. This is a help topic, not a function. The technical guide is linked from magComp-package.
Details
The magnitude model uses regression coefficients \(\beta\), iid group effects \(\delta_g\), and spatial effects \(v(s)\). Composition uses intercepts \(\alpha_{0j}\) and slope vectors \(\alpha_j\). Iid factor scores \(u_h\) have loadings \(\gamma_j\); spatial factor scores \(w(s)\) have loadings \(\lambda_j\). Additional terms and allocation blocks have their own parameter indices. Both factor types retain unit scale and the specified loading-anchor constraints. The index \(\ell\) denotes a retained posterior draw in the technical document.
The descriptive software names map to those symbols as follows:
- Magnitude coefficients \(\beta\)
Within
starting$magnitude,coefficientsis a vector named by design columns, including"(Intercept)". In the magnitude priors,coefficient_varianceis \(\sigma_\beta^2\).- Composition coefficients \(\alpha_{0j},\alpha_j\)
Each composition block has a
coefficientsmatrix with one row per coefficient stick and one column per design column. Its intercept column contains \(\alpha_{0j}\). Block prior settingsintercept_varianceandslope_varianceare \(\sigma_{\alpha,0}^2\) and \(\sigma_\alpha^2\), with defaults inherited from composition settings.- Magnitude effects \(\delta_{gt},v_t(s_i)\)
Within
starting$magnitude$terms[[term]],effectscontains the group or spatial effects,varianceis \(\sigma_{\delta,t}^2\) or \(\sigma_{v,t}^2\), and an estimated spatialcovariance$phiis \(\phi_{v,t}\). The corresponding prior term usesvariancefor inverse-gamma shape and scale andcovariance$phifor uniform bounds.- Composition loadings and scores
Within a composition block's
terms[[term]]entry,loadingscontains \(\gamma\) for iid terms or \(\lambda\) for spatial terms;scorescontains \(u\) or \(w\), respectively. An estimated spatialcovariance$phihas one value \(\phi_{w,t,k}\) per factor column. For the term,loading_variancespecifies \(c_{\gamma,t}\) or \(c_{\lambda,t}\);covariance$phigives uniform bounds.- Negative-binomial size \(r_M\)
The magnitude prior entry
sizegives Gamma shape and rate when size is estimated. The corresponding starting entry gives its initial value. By default size is estimated with Gamma(shape = 1, rate = 0.01) when there are no magnitude process terms. With those terms, or an explicitsize = NULLprior setting,control$nb_sizefixes its value.
Space-time effects use \(v(s,t)\) and \(w(s,t)\). Covariance entries
use the names listed by magCompCovModels, for example
covariance$lambda for temporal exponential decay.
Coefficient and loading prior variances and smoothing variances are fixed
hyperparameters. Magnitude process variances are estimated parameters.
For a composition coefficient vector \(\boldsymbol{\theta}_q\),
with \(q=0\) for intercepts and \(q>0\) for slopes, smoothing uses
\(\tau_q^2\): intercept_smoothing_variance sets the intercept
value and slope_smoothing_variance sets the common slope value within
a block.
magCompSmooth(intercept = , slope = ) controls composition intercept
and slope smoothing. samples returns posterior arrays
using the same descriptive branches and entry names as starting values.
Fixed size and covariance values are omitted.
magCompSettings and summary include a
symbol column using portable ASCII notation, such as beta,
sigma_delta^2, and phi_w. Summary columns separately identify
component, block, term, parameter, and
index. The index identifies a coefficient, stick/covariate pair,
stick/factor pair, or factor as appropriate. Parameter names are
coefficients, size, variance, loadings, and
covariance parameter names such as phi, lambda, and nu.
Traceplot labels join these identifying columns and display
the corresponding symbol.