Returns a statistical niftiImage object from a statMap object

stat.statMap(x, method = c("p", "S", "chisq"))

Arguments

x

the statMap object to extract a coefficient niftiImage from

method

the scale of visualization, chi-squared statistic, effect size (S=RESI), p-value. If df is equal to 1, the maps are scaled by the sign of the coefficient.

Value

a niftiImage object of the chi-square statistical image.

Examples

# loading example data
library(pain21)
pain = pain21()
pdata = pain$data

# fitting regression of images onto study sample size, weights proportional to study sample size
pbjModel2 = lmPBJ(images=pdata$images, form=~n, formred=~1, W = pdata$n, mask=pain$mask, data=pdata)
stat.statMap(pbjModel2)
#> Image array of mode "double" (6.9 Mb)
#> - 91 x 109 x 91 voxels
#> - 2 x 2 x 2 mm per voxel
stat.statMap(pbjModel2, method='chisq')
#> Image array of mode "double" (6.9 Mb)
#> - 91 x 109 x 91 voxels
#> - 2 x 2 x 2 mm per voxel
stat.statMap(pbjModel2, method='S')
#> Image array of mode "double" (6.9 Mb)
#> - 91 x 109 x 91 voxels
#> - 2 x 2 x 2 mm per voxel