Decompose Row Sums of a Theta Matrix into Single-Effect Components
Source:R/Rinternal.R
decompose_theta.RdGiven a \(p \times L\) matrix theta, this function redistributes
the row sums into a new matrix of the same shape where each row's total
effect is placed into a single column (using round-robin assignment).
This operation is useful for decomposing a combined effect vector into sparse single-effect columns (e.g., in spike-and-slab regression or additive effect models).