2. Mathematical Details

Introduction

Specification document - a mathematical description of models used by bage.

Note: some features described here have not been implemented yet.

Input data

  • outcome variable: events, numbers of people, or some sort of measure on a continuous variable such as income or expenditure
  • exposure/size/weights
  • disagg by one or more variables. Almost always includes age, sex/gender, and time. May include other variables eg region, ethnicity, education.
  • not all combinations of variables present; may be some missing values

Models

Poisson likelihood

Let yi be a count of events in cell i = 1, ⋯, n and let wi be the corresponding exposure measure, with the possibility that wi ≡ 1. The likelihood under the Poisson model is then using the shape-rates parameterisation of the Gamma distribution. Parameter ξ governs dispersion, with and We allow ξ to equal 0, in which case the model reduces to

For ξ > 0, Equations @ref(eq:lik-pois-1) and @ref(eq:lik-pois-2) are equivalent to (Norton, Christen, and Fox 2018; Simpson 2022). This is the format we use internally for estimation. When values for γi are needed, we generate them on the fly, using the fact that

Binomial likelihood

The likelihood under the binomial model is Parameter ξ again governs dispersion, with and

We allow ξ to equal 0, in which case the model reduces to Equations @ref(eq:lik-binom-1) and @ref(eq:lik-binom-2) are equivalent to which is what we use internally. Values for γi can be generated using

Normal likelihood

The normal model is where i is a standardized version of outcome yi, and i is a standardized version of weight wi. The standardization is carried out using where

Standardizing allows us to apply the same priors as we use for the Poisson and binomial models.

Model for prior means

Let μ = (μ1, ⋯, μn). Our model for μ is where

  • β(0) is an intercept;
  • β(m), m = 1, ⋯, M is a vector with Jm elements describing a main effect or interaction formed from the dimensions of data y;
  • X(m) is an n × Jm matrix of 1s and 0s, the ith row of which picks out the element of β(m) that is used with cell i;
  • Z is a n × P matrix of covariates; and
  • ζ is a coefficient vector with P elements.

Priors for Intercept, Main Effects, and Interactions

General features

‘Along’ and ‘by’ dimensions

Each β(m), m > 0, can be a main effect, involving a single dimension, or an interaction, involving two dimensions. Some priors, when applied to an interaction, treat one dimension, referred to as the ‘along’ dimension, differently from the remaining dimensions, referred to as ‘by’ dimensions. A random walk prior (Section @ref(sec:pr-rw)), for instance, consists of an independent random walk along the ‘along’ dimension, within each combination of the ‘by’ dimensions.

We use v = 1, ⋯, Vm to denote position within the ‘along’ dimension, and u = 1, ⋯, Vm to denote position within a classification formed by the ‘by’ dimensions. When there are no sum-to-zero constraints (see below), Um = ∏kdk where dk is the number of elements in the kth ‘by’ variable. When there are sum-to-zero constraints, Um = ∏k(dk − 1).

If a prior involves an ‘along’ dimension but the user does not specify one, the procedure for choosing a dimension is as follows:

  • if the term involves time, use the time dimension;
  • otherwise, if the term involves age, use the age dimension;
  • otherwise, raise an error asking the user to explicitly specify a dimension.

Sum-to-zero constraints

Priors that involve ‘along’ dimensions can optionally include sum-to-zero constraints. If these constrains are applied, then within each element v of the ‘along’ dimension, the sum of the βj(m) across each ‘by’ dimension is zero. For instance, if β(m) is an interaction between time, region, and sex, with time as the ‘along’ variable, then within each combination of time and region, the values for females and males sum to zero, and within each combination of time and sex, the values for regions sum to zero.

Except in the case of dynamic SVD-based priors (eg Sections @ref(sec:pr-svd-rw)), the sum-to-zero constraints are implemented internally by drawing values within an unrestricted lower-dimensional space, and then transforming to the restricted higher-dimensional space. For instance, a random walk prior for a time-region interaction with R regions consists of R − 1 unrestricted random walks along time, which are converted into R random walks that sum to zero across region. Matrices for transforming between the unrestricted and restricted spaces are constructed using the QR decomposition, as described in Section 1.8.1 of Wood (2017). With dynamic SVD-based priors, we draw values for the SVD coefficients with no constraints, convert these to unconstrained values for β(m), and then subtract means.

Algorithm for assigning default priors

  • If β(m) has one or two elements, assign β(m) a fixed-normal prior (Section @ref(sec:pr-fnorm));
  • otherwise, if β(m) involves time, assign β(m) a random walk prior (Section @ref(sec:pr-rw)) along the time dimension;
  • otherwise, if β(m) involves age, assign β(m) a random walk prior (Section @ref(sec:pr-rw)) along the age dimension;
  • otherwise, assign β(m) a normal prior (Section @ref(sec:pr-norm))

The intercept term β(0) can only be given a fixed-normal prior (Section @ref(sec:pr-fnorm)) or a Known prior (Section @ref(sec:pr-known)).

N()

Model

Exchangeable normal

Contribution to posterior density

Forecasting

Code

N(s = 1)
  • s is Aτ(m). Defaults to 1.

NFix()

Model

Exchangeable normal, with fixed standard deviation

Contribution to posterior density

Forecasting

Code

NFix(sd = 1)
  • sd is Aτ(m). Defaults to 1.

RW()

Model

Random walk

A0(m) can be 0, implying that βu, 1(m) is fixed at 0.

When Um > 1, sum-to-zero constraints (Section @ref(sec:sum-to-zero)) can be applied.

Contribution to posterior density

Forecasting

If the prior includes sum-to-zero constraints, means are subtracted from the forecasted values within each combination of ‘along’ and ‘by’ variables.

Code

RW(s = 1, along = NULL, zero_sum = TRUE)
  • s is Aτ(m). Defaults to 1.
  • sd is A0(m). Defaults to 1.
  • along used to identify ‘along’ and ‘by’ dimensions.
  • if zero_sum is TRUE, sum-to-zero constraints are applied.

RW2()

Model

Second-order random walk

A0(m) can be 0, implying that βu, 1(m) is fixed at 0.

When Um > 1, sum-to-zero constraints (Section @ref(sec:sum-to-zero)) can be applied.

Contribution to posterior density

Forecasting

If the prior includes sum-to-zero constraints, means are subtracted from the forecasted values within each combination of ‘along’ and ‘by’ variables.

Code

RW2(s = 1, sd = 1, sd_slope = 1, along = NULL, zero_sum = TRUE)
  • s is Aτ(m)
  • sd is A0(m)
  • sd_slope is Aη(m)
  • along used to identify ‘along’ and ‘by’ dimensions
  • if zero_sum is TRUE, sum-to-zero constraints are applied

RW_Seas()

Model

Random walk with seasonal effect

A0(m) can be 0, implying that αu, 1(m) is fixed at 0.

Aω(m)2 can be set to zero, implying that seasonal effects are fixed over time.

When Um > 1, sum-to-zero constraints (Section @ref(sec:sum-to-zero)) can be applied.

Contribution to posterior density

Forecasting

Code

RW_Seas(n_seas, s = 1, sd = 1, s_seas = 0, sd_seas = 1, along = NULL, zero_sum = FALSE)
  • n_seas is Sm
  • s is Aτ(m)
  • sd is A0(m)
  • s_seas is Aω(m)
  • sd_seas is Aλ(m)
  • along used to identify ‘along’ and ‘by’ dimensions
  • if zero_sum is TRUE, sum-to-zero constraints are applied

RW2_Seas()

Model

Second-order random work, with seasonal effect

A0(m) can be 0, implying that αu, 1(m) is fixed at 0.

Aω(m)2 can be set to zero, implying that seasonal effects are fixed over time.

When Um > 1, sum-to-zero constraints (Section @ref(sec:sum-to-zero)) can be applied.

Contribution to posterior density

Forecasting

Code

RW2_Seas(n_seas, s = 1, sd = 1, sd_slope = 1, s_seas = 0, sd_seas = 1, along = NULL, zero_sum = FALSE)
  • n_seas is Sm
  • s is Aτ(m)
  • sd is A0(m)
  • sd_slope is Aη(m)
  • s_seas is Aω(m)
  • sd_seas is Aλ(m)
  • along used to identify ‘along’ and ‘by’ dimensions
  • if zero_sum is TRUE, sum-to-zero constraints are applied

AR()

Model

Internally, TMB derives values for βu, v(m), v = 1, ⋯, Km, and for ωm, that imply a stationary distribution, and that give every term βu, v(m) the same marginal variance. We denote this marginal variance τm2, and assign it a prior Each of the ϕk(m) has prior

Contribution to posterior density

where p(βu, 1(m), ⋯, βu, Vm(m) ∣ ϕ1(m), ⋯, ϕKm(m), τm) is calculated internally by TMB.

Forecasting

Code

AR(n_coef = 2,
   s = 1,
   shape1 = 5,
   shape2 = 5,
   along = NULL,
   zero_sum = FALSE)
  • n_coef is Km
  • s is Aτ(m)
  • shape1 is S1(m)
  • shape2 is S2(m)
  • along is used to indentify the ‘along’ and ‘by’ dimensions

AR1()

Special case or AR(), with extra options for autocorrelation coefficient.

Model

This is adapted from the specification used for AR1 densities in TMB. It implies that the marginal variance of all βu, v(m) is τm2. We require that −1 < a0m < a1m < 1.

Contribution to posterior density

Forecasting

Code

AR1(s = 1,
    shape1 = 5,
    shape2 = 5,
    min = 0.8,
    max = 0.98,
    along = NULL,
    zero_sum = TRUE)
  • s is Aτ(m)
  • shape1 is S1(m)
  • shape2 is S2(m)
  • min is a0m
  • max is a1m
  • along is used to identify ‘along’ and ‘by’ dimensions

The defaults for min and max are based on the defaults for function ets() in R package forecast (Hyndman and Khandakar 2008).

Lin()

Model

Note that $\sum_{v=1}^{V_m} \alpha_{u,v}^{(m)} = 0$.

Contribution to posterior density

Forecasting

Code

Lin(s = 1, mean_slop = 0, sd_slope = 1, along = NULL, zero_sum = FALSE)
  • s is Aτ(m)
  • mean_slope is Bη(m)
  • sd_slope is Aη(m)
  • along is used to indentify ‘along’ and ‘by’ dimensions

Lin_AR()

Model

Note that $\sum_{v=1}^{V_m} \alpha_{u,v}^{(m)} = 0$.

Internally, TMB derives values for ϵu, v(m), v = 1, ⋯, Km, and for ωm, that provide the ϵu, v(m) with a stationary distribution in which each term has the same marginal variance. We denote this marginal variance τm2, and assign it a prior Each of the individual ϕk(m) has prior

Contribution to posterior density

where p(ϵu, 1(m), ⋯, ϵu, Vm(m) ∣ ϕ1(m), ⋯, ϕKm(m), τm) is calculated internally by TMB.

Forecasting

Code

Lin_AR(n_coef = 2,
       s = 1,
       shape1 = 5,
       shape2 = 5,
       mean_slope = 0,
       sd_slope = 1,
       along = NULL,
       zero_coef = FALSE)
  • n_coef is Km
  • s is Aτ(m)
  • shape1 is S1(m)
  • shape2 is S2(m)
  • mean_slope is Bη(m)
  • sd_slope is Aη(m)
  • along is used to indentify ‘along’ and ‘by’ variables

Lin_AR1()

TODO - WRITE DETAILS

Sp()

Model

Penalised spline (P-spline)

where βu(m) is the subvector of β(m) composed of elements from the uth combination of the ‘by’ variables, B(m) is a Vm × Km matrix of B-splines, and αu(m) has a second-order random walk prior (Section @ref(sec:pr-rw2)).

B(m) = (b1(m)(v), ⋯, bKm(m)(v)), with v = (1, ⋯, Vm). The B-splines are centered, so that 1bk(m)(v) = 0, k = 1, ⋯, Km.

Contribution to posterior density

Forecasting

Terms with a P-Spline prior cannot be forecasted.

Code

Sp(n = NULL, s = 1)
  • n is Km. Defaults to max (0.7Jm, 4).
  • s is the Aτ(m) from the second-order random walk prior. Defaults to 1.
  • along is used to identify ‘along’ and ‘by’ variables

SVD()

Model

Age but no sex or gender

Let βu be the age effect for the uth combination of the ‘by’ variables. With an SVD prior, where F(m) is a Vm × Km matrix, and g(m) is a vector with Vm elements, both derived from a singular value decomposition (SVD) of an external dataset of age-specific values for all sexes/genders combined. The construction of F(m) and g(m) is described in Appendix @ref(app:svd). The centering and scaling used in the construction allow use of the simple prior

Joint model of age and sex/gender

In the joint model, vector βu represents the interaction between age and sex/gender for the uth combination of the ‘by’ variables. Matrix F(m) and vector g(m) are calculated from data that separate sexes/genders. The model is otherwise unchanged.

Independent models for each sex/gender

In the independent model, vector βs, u represents age effects for sex/gender s and the uth combination of the ‘by’ variables, and we have Matrix Fs(m) and vector gs(m) are calculated from data that separate sexes/genders. The prior is

Contribution to posterior density

for the age-only and joint models, and for the independent model

Forecasting

Terms with an SVD prior cannot be forecasted.

Code

SVD(ssvd, n_comp = NULL, indep = TRUE)

where - ssvd is an object containing F and g - n_comp is the number of components to be used (which defaults to ceiling(n/2), where n is the number of components in ssvd - indep determines whether and independent or joint model will be used if the term being modelled contains a sex or gender variable.

SVD_RW()

Model

The SVD_RW() prior is identical to the SVD() prior except that the coefficients evolve over time, following independent random walks. For instance, in the combined-sex/gender and joint models with Km SVD components,

Contribution to posterior density

In the combined-sex/gender and joint models,

and in the independent model,

Forecasting

Code

SVD_RW(ssvd,
       n_comp = NULL,
       indep = TRUE,
       s = 1,
       sd = 1,
       zero_sum = FALSE)

where - ssvd is an object containing F and g - n_comp is Km - indep determines whether and independent or joint model will be used if the term being modelled contains a sex or gender variable. - s is Aτ(m) - sd is A0(m)

SVD_RW2()

Same structure as SVD_RW(). TODO - write details.

SVD_AR()

Same structure as SVD_RW(). TODO - write details.

SVD_AR1()

Same structure as SVD_RW(). TODO - write details.

Known

Model

Elements of β(m) are treated as known with certainty.

Contribution to posterior density

Known priors make no contribution to the posterior density.

Forecasting

Main effects with a known prior cannot be forecasted.

Code

Known(values)
  • values is a vector containing the βj(m).

Covariates

Model

The columns of matrix Z are assumed to be standardised to have mean 0 and standard deviation 1. Z does not contain a column for an intercept.

We implement two priors for coefficient vector ζ. The first prior is designed for the case where P, the number of colums of Z, is small, and most ζp are likely to distinguishable from zero. The second prior is designed for the case where P is large, and only a few ζp are likely to be distinguishable from zero.

Standard prior

Shrinkage prior

Regularized horseshoe prior (Piironen and Vehtari 2017)

where p0 is an initial guess at the number of ζp that are non-zero, and σ̂ is obtained as follows:

  • Poisson. Using maximum likelihood, fit the GLM and set
  • Binomial. Using maximum likelihood, fit the GLM and set
  • Normal. Using maximum likelihood, fit the linear model and set σ̂ = ξ̂.

The quantities used for Poisson and binomial likelihoods are derived from normal approximations to GLMs (Piironen and Vehtari 2017; Gelman et al. 2014, sec. 16.2).

Contribution to posterior density

TODO - write

Forecasting

TODO - write

Code

set_covariates(formula, data = NULL, n_coef = NULL)
  • formula is a one-sided R formula describing the covariates to be used
  • data A data frame. If a value for data is supplied, then formula is interpreted in the context of this data frame. If a value for data is not supplied, then formula is interpreted in the context of the data frame used for the original call to mod_pois(), mod_binom(), or mod_norm().
  • n_coef is the effective number of non-zero coefficients. If a value is supplied, the shrinkage prior is used; otherwise the standard prior is used.

Examples:

set_covariates(~ mean_income + distance * employment)
set_covariates(~ ., data = cov_data, n_coef = 5)

Prior for dispersion terms

Model

Use exponential distribution, parameterised using mean,

Contribution to prior density

Code

set_disp(mean = 1)
  • mean is μξ

Data models

Data models for outcome

Random Rounding to Base 3

Random rounding to base 3 (RR3) is a confidentialization method used by some statistical agencies. It is applied to counts data. Each count x is rounded randomly as follows:

  • If x mod  3 = 0, then x is left unchanged;
  • if x mod  3 = 1 then x is changed to x − 1 with probability 2/3, and is changed to x + 2 with probability 1/3; and
  • if x mod  3 = 2 then x is changed to x − 2 with probability 1/3, and is changed to x + 1 with probability 2/3.

RR3 data models can be used with Poisson or binomial likelihoods. Let yi denote the observed value for the outcome, and yi* the true value. The likelihood with a RR3 data model is then

Data models for exposure or size

Estimation

Filtering and Aggregation

The data that we supply to TMB is a a filtered and aggregated version of the data that the user provides through the data argument.

In the filtering stage, we remove any rows where (i) the offset is 0 or NA, or (ii) the outcome variable is NA.

In the aggregation stage, we identify any rows in the data that duplicated combinations of classification variables. For instance, if the classification variables are age and sex, and we have two rows where age is "20-24" and sex is "Female", then these rows would count as duplicated combinations. We aggregate offset and outcome variables across these duplicates. With Poisson and binomial models, the aggregation formula for outcomes is and the aggregation formula for exposure/size is where D is the number of times a particular combination is duplicated. With normal models, the aggregation formula for outcomes is and the aggregation formuala for weights is

Inner-Outer Approximation

Step 0: Select ‘inner’ and ‘outer’ variables

Select variables to be used in inner model. By default, these are the age, sex, and time variables in the model. All remaining variables are ‘outer’ variables.

Step 1: Fit inner model

Aggregate the data using the classification formed by the inner variables. (See Section @ref(sec:filter-ag) on aggregation procedures.) Remove all terms not involving ‘inner’ variables, other than the intercept term, from the model. Set dispersion to 0. Fit the resulting model.

Step 2: Fit outer model

Let μ̂iin be point estimates for the linear predictor μi obtained from the inner model.

Poisson model

Aggregate the data using the classification formed by the outer variables. Remove all terms involving the ‘inner’ variables, plus the intercept, from the model. Set dispersion to 0. Set exposure to wiout = μ̂inwi. Fit the model.

Binomial model

Fit the original model, but set dispersion to 0, and for all terms from the ‘inner’ model, use Known priors using point estimates from the inner model.

Normal model

Aggregate the data using the classification formed by the outer variables. Remove all terms involving the ‘inner’ variables, plus the intercept, from the model. Set the outcome variable to to $y_i^{} = y_i - ^{}. Fit the model.

Step 4: Concatenate estimates

Concatenate posterior distributions for the inner terms from the inner model to posterior distributions for the outer terms from the outer model.

Step 5: Calculate dispersion

If the original model includes a dispersion term, then estimate dispersion. Let μ̂icomb be point estimates for the linear predictor obtained from the concatenated estimates.

Poisson model

Use the original disaggregated data, or, if the original data contains more then 10,000 rows, select 10,000 rows at random from the original data. Remove all terms from the original model except for the intercept. Set exposure to wiout = μ̂combwi.

Binomial model

Fit the the original model, but with all terms except the intercept having Known priors, where the values are obtained from point estimates from the concatenated estimates.

Normal model

Use the original disaggregated data, or, if the original data contains more then 10,000 rows, select 10,000 rows at random from the original data. Remove all terms from the original model except for the intercept. Set the outcome to yiout = yi − μ̂comb.

Deriving outputs

Running TMB yields a set of means m, and a precision matrix Q−1, which together define the approximate joint posterior distribution of

  • β(m) for terms with independent normal, fixed normal, multivariate normal, random walk, second-order random walk, AR1, Linear, and Linear-AR1 priors,
  • α for terms with Spline and SVD priors,
  • hyper-parameters for β(m) and α(m) typically transformed to another scale, such as a log scale,
  • dispersion term ξ, and
  • seasonal effects λ, together with associated hyper-parameters τλ (on a log scale).

We use $\tilde{\pmb{\theta}}$ to denote a vector containing all these quantities.

We perform a Cholesky decomposition of Q−1, to obtain R such that We store R as part of the model object.

We draw generate values for $\tilde{\pmb{\theta}}$ by generating a vector of standard normal variates z, back-solving the equation and setting

Next we convert any transformed hyper-parameters back to the original units, and insert values for β(m) for terms that have Known priors. We denote the resulting vector θ.

Finally we draw from the distribution of γ ∣ y, θ using the methods described in Sections @ref(sec:pois)-@ref(sec:norm).

Simulation

To generate one set of simulated values, we start with values for exposure, trials, or weights, w, and possibly covariates Z, then go through the following steps:

  1. Draw values for any parameters in the priors for the β(m), m = 1, ⋯, M.
  2. Conditional on the values drawn in Step 1, draw values the β(m), m = 0, ⋯, M.
  3. If the model contains seasonal effects, draw the standard deviation κm, and then the effects λ(m).
  4. If the model contains covariates, draw φ and ϑp where necessary, draw coefficient vector ζ.
  5. Use values from steps 2–4 to form the linear predictor $\sum_{m=0}^{M} \pmb{X}^{(m)} (\pmb{\beta}^{(m)} + \pmb{\lambda}^{(m)}) + \pmb{Z} \pmb{\zeta}$.
  6. Back-transform the linear predictor, to obtain vector of cell-specific parameters μ.
  7. If the model contains a dispersion parameter ξ, draw values from the prior for ξ.
  8. In Poisson and binomial models, use μ and, if present, ξ to draw γ.
  9. In Poisson and binomial models, use γ and w to draw y; in normal models, use μ, ξ, and w to draw y.

Replicate data

Model

Poisson likelihood

Condition on γ

Condition on (μ, ξ)

which is equivalent to

Binomial likelihood

Condition on γ

Condition on (μ, ξ)

Normal likelihood

Data models for outcomes

If the overall model includes a data model for the outcome, then a further set of draws is made, deriving values for the observed outcomes, given values for the true outcomes.

Code

replicate_data(x, condition_on = c("fitted", "expected"), n = 20)

Appendices

Definitions

Quantity Definition
i Index for cell, i = 1, ⋯, n.
yi Value for outcome variable.
wi Exposure, number of trials, or weight.
γi Super-population rate, probability, or mean.
μi Cell-specific mean.
ξ Dispersion parameter.
g() Log, logit, or identity function.
m Index for intercept, main effect, or interaction. m = 0, ⋯, M.
j Index for element of a main effect or interaction.
u Index for combination of ‘by’ variables for an interaction. u = 1, ⋯Um. UmVm = Jm
v Index for the ‘along’ dimension of an interaction. v = 1, ⋯Vm. UmVm = Jm
β(0) Intercept.
β(m) Main effect or interaction. m = 1, ⋯, M.
βj(m) jth element of β(m). j = 1, ⋯, Jm.
X(m) Matrix mapping β(m) to y.
Z Matrix of covariates.
ζ Parameter vector for covariates Z(m).
A0 Scale parameter in prior for intercept β(0) or initial value.
τm Standard deviation parameter for main effect or interaction.
Aτ(m) Scale parameter in prior for τm.
α(m) Parameter vector for P-spline and SVD priors.
αk(m) kth element of α(m). k = 1, ⋯, Km.
V(m) Covariance matrix for multivariate normal prior.
hj(m) Linear covariate
η(m) Parameter specific to main effect or interaction β(m).
ηu(m) Parameter specific to uth combination of ‘by’ variables in interaction β(m).
Aη(m) Standard deviation in normal prior for ηm.
ωm Standard deviation of parameter ηc in multivariate priors.
ϕm Correlation coefficient in AR1 densities.
a0m, a1m Minimum and maximum values for ϕm.
B(m) B-spline matrix in P-spline prior.
bk(m) B-spline. k = 1, ⋯, Km.
F(m) Matrix in SVD prior.
g(m) Offset in SVD prior.
βtrend Trend effect.
βcyc Cyclical effect.
βseas Seasonal effect.
φ Global shrinkage parameter in shrinkage prior.
Aφ Scale term in prior for φ.
ϑp Local shrinkage parameter in shrinkage prior.
p0 Expected number of non-zero coefficients in ζ.
σ̂ Empirical scale estimate in prior for φ.
π Vector of hyper-parameters

SVD prior for age

Let A be a matrix of age-specific estimates from an international database, transformed to take values in the range (−∞, ∞). Each column of A represents one set of age-specific estimates, such as log mortality rates in Japan in 2010, or logit labour participation rates in Germany in 1980.

Let U, D, V be the matrices from a singular value decomposition of A, where we have retained the first K components. Then

Let mk and sk be the mean and sample standard deviation of the elements of the kth row of V, with m = (m1, ⋯, mk) and s = (s1, ⋯, sk). Then is a standardized version of V.

We can rewrite @ref(eq:svd1) as where F = UDdiag(s) and g = UDm.

Let $\tilde{\pmb{v}}_l$ be a randomly-selected column from $\tilde{\pmb{V}}$. From the construction of $\tilde{\pmb{V}}$ we have E[kl] = 0 and var[kl] = 1. If z is a vector of standard normal variables, then should look approximately like a randomly-selected column from the original data matrix A.

References

Gelman, A., J. B. Carlin, H. S. Stern, D. B. and Dunson, A. Vehtari, and D. B. Rubin. 2014. Bayesian Data Analysis. Third Edition. New York: Chapman; Hall.
Hyndman, Rob J, and Yeasmin Khandakar. 2008. “Automatic Time Series Forecasting: The Forecast Package for R.” Journal of Statistical Software 26 (3): 1–22. https://doi.org/10.18637/jss.v027.i03.
Norton, Richard A, J Andrés Christen, and Colin Fox. 2018. “Sampling Hyperparameters in Hierarchical Models: Improving on Gibbs for High-Dimensional Latent Fields and Large Datasets.” Communications in Statistics-Simulation and Computation 47 (9): 2639–55.
Piironen, Juho, and Aki Vehtari. 2017. On the Hyperprior Choice for the Global Shrinkage Parameter in the Horseshoe Prior.” In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, edited by Aarti Singh and Jerry Zhu, 54:905–13. Proceedings of Machine Learning Research. PMLR. https://proceedings.mlr.press/v54/piironen17a.html.
Simpson, Dan. 2022. “Priors Part 4: Specifying Priors That Appropriately Penalise Complexity.” https://dansblog.netlify.app/posts/2022-08-29-priors4/priors4.html.
Wood, Simon N. 2017. Generalized Additive Models: An Introduction with R. Chapman; Hall/CRC.