
Blackbox-transpose scaling of a respondent-by-stimulus rating matrix
Source:R/BlackboxTranspose.R
BlackboxTranspose.RdA line-for-line port of the BLACKBOXT Fortran routine of the basicspace
package. The stimuli-by-respondents matrix is decomposed as
X = P W' + J c' + E one dimension at a time by alternating least
squares (starting values from sign-corrected row means, column signs from
the pairwise-complete correlation matrix), refined with all dimensions
jointly, and the fitted P t(W) is re-expressed by its singular value
decomposition. Stimulus coordinates are the unit right singular vectors;
respondent weights are U sqrt(s) with intercepts c. In two
dimensions the solution is rotated so its first axis matches the
one-dimensional solution, as in the Fortran. Respondents with fewer than
dims + 2 answers are dropped (NULL rows); stimuli with fewer
than 8 answers are excluded from the starting values. Needs more scaled
respondents than stimuli. Singular vectors are signed so that each one's
largest entry is positive (LAPACK's signs are arbitrary), so columns can
differ in sign from basicspace, which also rounds to three decimals.
Identical to the Python arm morie.fn.blackboxt.
Value
A list with stimuli (per dimension, rows
n, coord_1..coord_d, R2), individuals (per dimension, rows
c, w_1..w_d, R2 or NULL), fits (per dimension: SSE,
SSE_explained, percent, cumulative_percent, R2, SE, singular),
n_row (stimuli), n_col (scaled respondents), n_data,
n_miss, ss_mean and dims.