Skip to content

Commit

Permalink
trying to bootstrap icc estimates
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Craddock committed Feb 1, 2017
1 parent b34ff71 commit 3f80354
Show file tree
Hide file tree
Showing 3 changed files with 470 additions and 11 deletions.
42 changes: 41 additions & 1 deletion data_analysis/ABIDE_CORR_colinearity.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,46 @@
" Qi1='Fraction of Artifact Voxels',\n",
" SNR='SNR')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"?install.packages"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Updating HTML index of packages in '.Library'\n",
"Making 'packages.html' ... done\n"
]
}
],
"source": [
"install.packages(\"boot\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -218,7 +258,7 @@
"mimetype": "text/x-r-source",
"name": "R",
"pygments_lexer": "r",
"version": "3.3.2"
"version": "3.3.1"
}
},
"nbformat": 4,
Expand Down
133 changes: 123 additions & 10 deletions data_analysis/ABIDE_measures_and_ratings.R.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,58 @@
"cells": [
{
"cell_type": "code",
"execution_count": 217,
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"Attaching package: ‘dplyr’\n",
"\n",
"The following object is masked from ‘package:gridExtra’:\n",
"\n",
" combine\n",
"\n",
"The following objects are masked from ‘package:stats’:\n",
"\n",
" filter, lag\n",
"\n",
"The following objects are masked from ‘package:base’:\n",
"\n",
" intersect, setdiff, setequal, union\n",
"\n",
"\n",
"Attaching package: ‘tidyr’\n",
"\n",
"The following object is masked from ‘package:reshape2’:\n",
"\n",
" smiths\n",
"\n",
"Loading required package: lattice\n",
"Loading required package: survival\n",
"Loading required package: Formula\n",
"\n",
"Attaching package: ‘Hmisc’\n",
"\n",
"The following objects are masked from ‘package:dplyr’:\n",
"\n",
" combine, src, summarize\n",
"\n",
"The following object is masked from ‘package:gridExtra’:\n",
"\n",
" combine\n",
"\n",
"The following objects are masked from ‘package:base’:\n",
"\n",
" format.pval, round.POSIXt, trunc.POSIXt, units\n",
"\n"
]
}
],
"source": [
"# Load some needed packages\n",
"library(grid)\n",
Expand All @@ -22,7 +69,7 @@
},
{
"cell_type": "code",
"execution_count": 218,
"execution_count": 3,
"metadata": {
"collapsed": true
},
Expand Down Expand Up @@ -68,7 +115,7 @@
},
{
"cell_type": "code",
"execution_count": 231,
"execution_count": 4,
"metadata": {
"collapsed": true
},
Expand Down Expand Up @@ -260,7 +307,7 @@
},
{
"cell_type": "code",
"execution_count": 219,
"execution_count": 5,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -377,7 +424,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 6,
"metadata": {
"collapsed": false
},
Expand All @@ -395,7 +442,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 7,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -480,7 +527,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 8,
"metadata": {
"collapsed": false
},
Expand All @@ -500,7 +547,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 9,
"metadata": {
"collapsed": false
},
Expand All @@ -511,6 +558,52 @@
"pheno_df$qc_func<-factor(pheno_df$qc_func, levels=c(1,2), labels=c(\"Fail\", \"OK\"))"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<thead><tr><th></th><th scope=col>qc_func</th><th scope=col>qc_anat</th><th scope=col>N</th></tr></thead>\n",
"<tbody>\n",
"\t<tr><th scope=row>1</th><td>Fail</td><td>Fail</td><td>95 </td></tr>\n",
"\t<tr><th scope=row>2</th><td>Fail</td><td>OK </td><td>110 </td></tr>\n",
"\t<tr><th scope=row>3</th><td>OK </td><td>Fail</td><td>83 </td></tr>\n",
"\t<tr><th scope=row>4</th><td>OK </td><td>OK </td><td>824</td></tr>\n",
"</tbody>\n",
"</table>\n"
],
"text/latex": [
"\\begin{tabular}{r|lll}\n",
" & qc\\_func & qc\\_anat & N\\\\\n",
"\\hline\n",
"\t1 & Fail & Fail & 95 \\\\\n",
"\t2 & Fail & OK & 110 \\\\\n",
"\t3 & OK & Fail & 83 \\\\\n",
"\t4 & OK & OK & 824\\\\\n",
"\\end{tabular}\n"
],
"text/plain": [
" qc_func qc_anat N\n",
"1 Fail Fail 95\n",
"2 Fail OK 110\n",
"3 OK Fail 83\n",
"4 OK OK 824"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"pheno_df %>% group_by(qc_func,qc_anat) %>% summarise(N=n())"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -1210,6 +1303,26 @@
"?gsub"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "ERROR",
"evalue": "Error in eval(expr, envir, enclos): object 'abide_func_df' not found\n",
"output_type": "error",
"traceback": [
"Error in eval(expr, envir, enclos): object 'abide_func_df' not found\nTraceback:\n"
]
}
],
"source": [
"abide_func_df$qc_func"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -1233,7 +1346,7 @@
"mimetype": "text/x-r-source",
"name": "R",
"pygments_lexer": "r",
"version": "3.3.2"
"version": "3.3.1"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 3f80354

Please sign in to comment.