Description Usage Arguments Value Author(s) See Also Examples
View source: R/multiscaleSVDxpts.R
This function computes a prediction or low-dimensional embedding, given
milr
output. It will return a predictive model if the outcome variable
is a scalar. Otherwise, it will return a low-dimensional embedding without
a specific predictive model.
1 2 3 4 5 6 7 8 | milr.predict(
milrResult,
dataFrameTrain,
voxmatsTrain,
dataFrameTest,
voxmatsTest,
myFormula
)
|
milrResult |
This output form milr |
dataFrameTrain |
This data frame contains all relevant predictors in the training data except for the matrices associated with the image variables. |
voxmatsTrain |
The named list of matrices that contains the changing predictors. |
dataFrameTest |
This data frame contains all relevant predictors in the training data except for the matrices associated with the image variables in test data. |
voxmatsTest |
The named list of matrices that contains the changing predictors in test data. |
myFormula |
This is a character string that defines a valid regression formula. |
the predicted matrix.
BB Avants.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | nsub = 24
npix = 100
outcome = rnorm( nsub )
covar = rnorm( nsub )
mat = replicate( npix, rnorm( nsub ) )
mat2 = replicate( npix, rnorm( nsub ) )
mat3 = replicate( npix, rnorm( nsub ) )
myform = " vox2 ~ covar + vox + vox3 "
istr = c( rep( TRUE, round(nsub*2/3) ), rep( FALSE, nsub - round(nsub*2/3)) )
df = data.frame( outcome = outcome, covar = covar )
ltr = list( vox = mat[ istr,], vox2 = mat2[istr,], vox3 = mat3[istr,] )
lte = list( vox = mat[!istr,], vox2 = mat2[!istr,], vox3 = mat3[!istr,] )
result = milr( df[istr,], ltr, myform)
pred = milr.predict( result, df[istr,],ltr, df[!istr,], lte, myform )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.