[MINC-users] FDR analysis for cortical thickness

Kelvin Mok kelvin.mok at mcgill.ca
Fri Jun 8 18:01:42 EDT 2012


Hey Jonathan,

Mishkin mentioned it below, but your t-stats can be loaded with: 
(assuming that you have analyzed your data in your R session, or you 
used --save option)
vs$tstatistic[0,]
(your script uses the variable name "vs" )

This will spit out the variables where we have t-statistics (ie 
Intercept, Variable1, Variable2, Interaction1:2), then you can choose 
the corresponding column:
vs$tstatistic[,1]  (i.e, Intercept)
vs$tstatistic[,2]  (i.e. Variable1)
vs$tstatistic[,3]  (i.e. Variable2)

Since we're already using Jason's stats library, we can send the column 
of t-statistics values directly into his FDR function, mni.compute.FDR.
qvalues<-mni.compute.FDR(*t.stats=vs$tstatistics,column.name=column#*,df=_inputdegoffreedom__,fdr=0.05)

Then, the false discovery rate value would be here:
qvalues$fdr.threshold

We just made an error in your script defining the t.stats variable.

Kelvin


On 2012-06-08, at 2:40 PM, Jonathan Berken wrote:

> How do I open my list of t-values?
>
> On Fri, Jun 8, 2012 at 2:35 PM, Mishkin Derakhshan <mishkind at gmail.com 
> <mailto:mishkind at gmail.com>>wrote:
>
>> On Fri, Jun 8, 2012 at 2:06 PM, Jonathan Berken
>> <jonathan.berken at gmail.com <mailto:jonathan.berken at gmail.com>> wrote:
>>> Hi Mishkin,
>>>
>>> Thanks so much for your help!
>>>
>>> I already have R library and have ran cortical thickness analyses... 
>>> I am
>>> just not sure how to run the FDR analysis... I have the script from the
>>> site, but not sure where to get the t-values from my results to input?
>>
>> So if you've ran the cortical thickness analyses, then you should have
>> some t-values for whatever you tested for.
>>
>> In my example script, my array of t-values comes from here:
>> vertexstatistics <- mni.vertex.statistics(glimfile, 'y ~ group',
>> vertex.table=datatable)
>>
>> vertexstatistics contains a lot of different items, the array of
>> t-values are here:
>> vertexstatistics\$tstatistic[,2]
>>
>> The t-values represent the result of a two-tailed t-test for the test
>> y ~ group, which usually means you are testing for differences in
>> cortical thickness (y) in the different groups (ie. francophones vs.
>> anglophones). What 'y' and 'group' actually mean, depend on what you
>> put in your glim file, but if you've ran your analysis already then i
>> have a feeling you know this already.
>>
>>> Can
>>> I run the FDR after I do my initial CT regression?
>>
>> Sorry, but I don't actually know what you mean by initial CT
>> regression? I use MRI data, and I don't actually look for differences
>> in cortical thickness but just use the library for other vertex wise
>> tests that I need. Like Jason said though, the FDR can be calculated
>> on any array of t-values (or pvalues) that are the output of anything
>> you are trying to test for.
>>
>> If you look at the code (in R type: 'library(mni.crotical.statistics)'
>> then 'mni.compute.FDR') you can see that it actually needs p-values,
>> but it can compute those from the given t-stats if you give it the
>> degrees of freedom.
>>
>>>
>>> Jonathan
>>>
>>> On Fri, Jun 8, 2012 at 2:00 PM, Mishkin Derakhshan 
>>> <mishkind at gmail.com <mailto:mishkind at gmail.com>>
>>> wrote:
>>>>
>>>> Hi Jonathan,
>>>>
>>>> At the risk of depriving you hours of endless fun coding this up
>>>> yourself, attached is my implementation using the
>>>> mni.cortical.statistics library (which you will need to install).
>>>>
>>>> There is quite a bit of documentation on the bic wiki:
>>>> http://wiki.bic.mni.mcgill.ca/index.php/ThicknessStatistics
>>>>
>>>> I'm at wb319 in the bic if you need help.
>>>> mishkin
>>>>
>>>> p.s this is how to install the R library (using a bash shell) if you
>>>> didn't know:
>>>> 1. download the mni.cortical.statistics library
>>>> 2. R CMD INSTALL --library=/path/to/useful/extra/libraries/for/R/
>>>> mni.cortical.statistics
>>>> 3. export R_LIBS=/path/to/useful/extra/libraries/for/R/
>>>>
>>>>
>>>> On Fri, Jun 8, 2012 at 11:19 AM, Jason Lerch 
>>>> <jason at phenogenomics.ca <mailto:jason at phenogenomics.ca>>
>>>> wrote:
>>>>> There's an implementation in mni.cortical.statistcs and RMINC as well
>> as
>>>>> Keith's matlab surfstats.
>>>>>
>>>>> The recipe in R:
>>>>>
>>>>> 1) create a vector of p-values
>>>>> 2) qvals <- p.adjust(pvalues, "fdr")
>>>>>
>>>>> Jason
>>>>>
>>>>> On 2012-06-08, at 11:15 AM, Jonathan Berken wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I was wondering if someone who is familiar with FDR analysis for
>>>>>> cortical
>>>>>> thickness might be able to help me work out the script.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Jonathan
>>>>>> _______________________________________________
>>>>>> MINC-users at bic.mni.mcgill.ca <mailto:MINC-users at bic.mni.mcgill.ca>
>>>>>> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>>>>>
>>>>> _______________________________________________
>>>>> MINC-users at bic.mni.mcgill.ca <mailto:MINC-users at bic.mni.mcgill.ca>
>>>>> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>>>>
>>>> _______________________________________________
>>>> MINC-users at bic.mni.mcgill.ca <mailto:MINC-users at bic.mni.mcgill.ca>
>>>> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>>>>
>>>
>> _______________________________________________
>> MINC-users at bic.mni.mcgill.ca <mailto:MINC-users at bic.mni.mcgill.ca>
>> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca <mailto:MINC-users at bic.mni.mcgill.ca>
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users




More information about the MINC-users mailing list