Description Usage Arguments Details Value Examples
View source: R/compute_cohend.R
Cohen's d computation for neuroimaging data
1 2 |
imgs1 |
4d image of group 1 |
imgs2 |
4d image of group 2 |
mask |
Mask file (default=array(1,dim=dim(imgs1)[1:3])) |
figure |
(default=TRUE) draw image |
col |
(only if figure=TRUE, default=bluered(200)) |
breaks |
(only if figure=TRUE, default=c(-100:100)/100*7) |
This function computes simple Cohen's d maps from neuroimaging data for group level analysis. The formula we use is
d=\frac{\bar{X}_1- \bar{X}_2}{s_{pooled}},
s_{pooled} is the pooled standard deviation in two groups.
cohen.dmap: image array of Cohen's d.
1 2 3 4 5 6 7 8 9 | library(neurorct)
img.dim=c(10,12,15)
n=10
treatment=array(rnorm(img.dim[1]*img.dim[2]*img.dim[3]*n),dim=c(img.dim,n))
treatment[3:5,3:5,3:5,] <- 10+treatment[3:5,3:5,3:5,]
control=array(rnorm(img.dim[1]*img.dim[2]*img.dim[3]*n),dim=c(img.dim,n))
control[3:5,3:5,3:5,] <- 12+control[3:5,3:5,3:5,]
mask=array(0,img.dim);mask[2:8,2:11,2:14]<-1
z=compute_cohend(imgs1=treatment,imgs2=control,mask=mask)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.