This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" | |
class="in-text"> | |
<info> | |
<title>My First Style</title> | |
<id>my-first-style</id> | |
<updated>2008-10-29T21:01:24+00:00</updated> | |
</info> | |
<macro name="author-short"> | |
<names variable="author"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/trk_compile_data.m b/trk_compile_data.m | |
index 0b2ddfe..90d3d15 100644 | |
--- a/trk_compile_data.m | |
+++ b/trk_compile_data.m | |
@@ -52,17 +52,12 @@ function [track_means,starting_pts_out] = trk_compile_data(subsDir,subIDs,tract_ | |
if nargin < 7 || isempty(saveASCII), saveASCII = 0; end | |
if nargin < 6 || isempty(saveTrk), saveTrk = 0; end | |
if nargin < 5 || isempty(starting_pts_in) | |
- starting_pts_in = dataset(); | |
-elseif ~iscell(starting_pts_in.Subject) % Reformat to cells if subIDs are all numeric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exptDir = '/Users/jcolby/Documents/LONI/along-tract-stats/along-tract-stats.git/example/between_group' | |
grpLabs = c('Control', 'FASD') | |
thresh = 0.05 | |
nPerms = 100 | |
library(nlme) # Mixed-effects models | |
library(ggplot2) # Plotting tools | |
library(plyr) # Data manipulation | |
library(RColorBrewer) # Color tables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/example/between_group/between_grp.R b/example/between_group/between_grp.R | |
index ffeeaeb..e2d1c08 100644 | |
--- a/example/between_group/between_grp.R | |
+++ b/example/between_group/between_grp.R | |
@@ -77,16 +77,7 @@ doPerms <- function(df, demog, nPerms=100){ | |
maxT | |
} | |
-# Only correct for multiple comparisons across the tracts with a significant | |
-# Point:Group interaction F-test. Set the corrected p-values of other tracts to 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/trk_plot.m b/trk_plot.m | |
index 30e0a4a..26cf093 100644 | |
--- a/trk_plot.m | |
+++ b/trk_plot.m | |
@@ -37,6 +37,9 @@ if nargin < 4 || isempty(slices), slices = header.dim/2; end | |
if ~isstruct(tracks), error('Tracks must be in structure form. Try running TRK_RESTRUC first.'), end | |
+levels = [0 25 50 75 100];^M | |
+levels = round(levels*(97-1)/100 + 1);^M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function to plot color bar | |
color.bar <- function(lut, min, max=-min, nticks=11, ticks=seq(min, max, len=nticks), title='') { | |
scale = (length(lut)-1)/(max-min) | |
dev.new(width=1.75, height=5) | |
plot(c(0,10), c(min,max), type='n', bty='n', xaxt='n', xlab='', yaxt='n', ylab='', main=title) | |
axis(2, ticks, las=1) | |
for (i in 1:(length(lut)-1)) { | |
y = (i-1)/scale + min | |
rect(0,y,10,y+1/scale, col=lut[i], border=NA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(plyr) | |
library(ggplot2) | |
# Simulate data | |
numSubs = 40 | |
x = runif(numSubs, 0, 30) | |
x = c(x, x + abs(rnorm(numSubs, 2))) | |
y = 2 + x - 0.02*x^2 + rnorm(2*numSubs, 0, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(plyr) | |
data = arrange(data.frame(ID=1:10, FA=runif(50, 0.2, 0.8)), ID) | |
ddply(data, 'ID', mean) # using plyr library | |
aggregate(data, list(ID=data$ID), mean) # using base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-1.22920245520088 1.26297072626596 1.83337525320795 | |
1.20936180458861 0.611215979963239 -1.30133702133403 | |
0.522987838117479 -0.451731971345027 -0.58388185591968 | |
0.101340272969554 -0.435726497850704 0.569398963635685 | |
0.426031516466784 0.151080475310323 0.956491447694583 | |
-0.252059713648723 -0.175471660877733 -0.980883888395024 | |
0.662052189667485 1.33212600996006 -1.47268894052709 | |
1.48817331808508 -0.0473711069814109 -0.492789669961388 | |
-0.503441036994115 -0.294926138113795 0.366179342735957 | |
-2.12920560829524 1.02332212331524 -1.58266122316052 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download example data from: https://github.com/johncolby/SVM-RFE/zipball/master | |
setwd('/path/to/SVM-RFE/') # Change this to your setup | |
load('demo/input.Rdata') | |
data = input[, 2:3] | |
input = input[, -(1:3)] | |
# Function to residualize a vector x for the covariates in data | |
residualize <- function(x, fun=x~., data) { |
OlderNewer