JOFC on CxP data

YP, MT, JV, CEP, …

Mon Apr 22 09:58:21 2013

Goal

The long term goal is to discover structure that is meaningful in terms of treatment outcomes.

Data

  1. C-data (time_series_cc200_20130402): C is for connectome, which just refers, in this case, to the fMRI data. The 197 regions are obtained from the 'all voxel' data via parsing voxels into regions. We already know the function relating the 197 to the all voxels case, because we wrote it.

  2. P-data (NEO2012.csv): P is short for phenotype, in this case, it is the 5 factor model, which are the 5 factors: ENOAC (sometimes ordered differently and called OCEAN).

Supplements

  1. NEO2012.csv has 42 subjects and the following columns: ParticipantID,Sex,Age,E,N,O,A,C the last 5 are the “5 factors”

  2. NEO2012_linkage.csv has 42 subjects and 2 columns: the first is the ParticipantID, which is listed in the other file, the second is the file name. so it maps participant id to file, which we need.

  3. ScaledScales.xls: this is the file that had the original data that i extracted NEO2012.csv from. you shouldn't need it, but it is the raw data, so i didn't want to discard it.

C Data

print(load("outC.Rbin"))
## [1] "outC"
attach(outC)
dim(ts[[1]])
## [1] 194 197
plotmat(ts[[1]])

plot of chunk dissmatata

run spectrum on ts for each region

plot of chunk unnamed-chunk-2 plot of chunk unnamed-chunk-2

bandpass and normalize it

plot of chunk unnamed-chunk-3 plot of chunk unnamed-chunk-3

calc KL among regions

plot of chunk unnamed-chunk-4

calc normalized cosdist among subjects

distC <- normalize(dissmat)
dim(distC)
## [1] 42 42

plot of chunk plotC plot of chunk plotC plot of chunk plotC plot of chunk plotC

P Data

outP <- doPdata()
attach(outP)
plotmat(as.matrix(pdat))

plot of chunk Pdata

distP <- dmat
distP <- normalize(distP)
dim(distP)
## [1] 42 42

plot of chunk plotP plot of chunk plotP plot of chunk plotP plot of chunk plotP

JOFC

## form omnibus matrix
meanD <- (distC + distP)/2
omni <- rbind(cbind(distC, meanD), cbind(t(meanD), distP))
dim(omni)
## [1] 84 84
## embed
n2 <- n * 2
mds <- cmdscale(omni, n2 - 1)
# w <- 0.01 W1 <- matrix(w,n,n) W2 <- matrix(0,n,n) diag(W2) <- 1-w W <-
# rbind(cbind(W1,W2),cbind(t(W2),W1)) mds <-
# smacofSym(omni,n2-1,weightmat=W)$conf

plot of chunk JOFC-omni-w

elbow <- getElbows(mds, 3)

plot of chunk JOFC-mds

dat <- mds[, 1:elbow[2]]

## cluster
cl <- Mclust(dat)
summary(cl)
## ----------------------------------------------------
## Gaussian finite mixture model fitted by EM algorithm 
## ----------------------------------------------------
## 
## Mclust VVI (diagonal, varying volume and shape) model with 2 components:
## 
##  log.likelihood  n df  BIC
##            2264 84 69 4222
## 
## Clustering table:
##  1  2 
## 48 36
plot(cl, "BIC")

plot of chunk JOFC-mds

plot of chunk JOFC-scatter plot of chunk JOFC-scatter

table(cluster = cl$class, data = lab)
##        data
## cluster  C  P
##       1  6 42
##       2 36  0
adjustedRandIndex(cl$class, as.numeric(lab))
## [1] 0.7315