This function simplifies calculating image-wide multivariate beta maps from that is similar to CCA.

simlr2(
  voxmats,
  basisK,
  smoothingMatrixX,
  smoothingMatrixY,
  iterations = 10,
  gamma = 0.000001,
  sparsenessQuantileX = 0.5,
  sparsenessQuantileY = 0.5,
  positivityX = c("positive", "negative", "either"),
  positivityY = c("positive", "negative", "either"),
  initialUMatrix,
  orthogonalize = TRUE,
  repeatedMeasures = NA,
  verbose = FALSE
)

Arguments

voxmats

A list that contains the named x and y matrices.

basisK

an integer determining the size of the basis.

smoothingMatrixX

allows parameter smoothing, should be square and same size as input matrix on left side of equation

smoothingMatrixY

allows parameter smoothing, should be square and same size as input matrix on right side of equation

iterations

number of gradient descent iterations

gamma

step size for gradient descent

sparsenessQuantileX

quantile to control sparseness - higher is sparser

sparsenessQuantileY

quantile to control sparseness - higher is sparser

positivityX

restrict to positive or negative solution (beta) weights. choices are positive, negative or either as expressed as a string.

positivityY

restrict to positive or negative solution (beta) weights. choices are positive, negative or either as expressed as a string.

initialUMatrix

initialization matrix size n by k. If this is missing, a random matrix will be used.

orthogonalize

boolean to control whether we orthogonalize the solutions explicitly

repeatedMeasures

list of repeated measurement identifiers. this will allow estimates of per identifier intercept.

verbose

boolean to control verbosity of output

Value

A list of u, x and y-related matrices.

See also

Examples

set.seed(1500) nsub = 12 npix = 100 outcome = rnorm( nsub ) covar = rnorm( nsub ) mat = replicate( npix, rnorm( nsub ) ) mat2 = replicate( npix + 10, rnorm( nsub ) ) mat3 = replicate( npix + 10, rnorm( nsub ) ) nk = 3 result = simlr2( list( vox = mat, vox2 = mat2, vox3 = mat3 ), basisK = 3 )