Skip to content

Instantly share code, notes, and snippets.

View mickeypash's full-sized avatar
🐢
slow and steady wins the race

Mickey Pashov mickeypash

🐢
slow and steady wins the race
View GitHub Profile
@mickeypash
mickeypash / Shapiro-test
Created March 7, 2014 15:46
Playing with normality
> shapiro.test(prop.mean$PComp)
Shapiro-Wilk normality test
data: prop.mean$PComp
W = 0.9662, p-value = 0.528
> shapiro.test(prop.mean$SComp)
Shapiro-Wilk normality test
@mickeypash
mickeypash / mickey_tea_tasting
Created March 4, 2014 23:11
One-sample T -tests of proportion of fixations for PComp and Unrl at 800ms bins?
## T-test
library(plyr)
load(file="preprocessed.RData")
# Read data
trials <- tinfo4
responses <- dat4
# Change column names
@mickeypash
mickeypash / plot.R
Created February 28, 2014 16:49
can anyone tell me how to imporve this plot
load(file="preprocessed.RData")
load(file="alldat.RData")
colnames(alldat) <- sub("\\.x$", "", colnames(alldat))
rownames(alldat) <- NULL
mx <- as.matrix(xtabs(~AOI+Msec, alldat))
props <- mx / apply(mx, 2, sum)
# Use ggplot to make it cool?
@mickeypash
mickeypash / zeltek.R
Created February 24, 2014 06:51
This is what I came up with. Not sure if this works for you.
clippedaod <- data.frame(yr=c(2000,2001,2002,2003,2004,2005))
tst <- c()
for(i in 2000:2013){
tst[i] <- (clippedaod$yr == i)
print(i)
}
@mickeypash
mickeypash / preprocess.R
Created February 24, 2014 06:27
preprocessing script for raw data from Lex app
library(XML)
atime <- read.csv("audiotimings.csv")
atime$ItemID <- as.numeric(substr(atime$Wavfile, 2, 3))
options(stringsAsFactors=FALSE)
getfile <- function(x, ext=NULL) {
return(paste(paste(mypath, x$base, sep="/"), ext, "txt", sep="."))
}
@mickeypash
mickeypash / .gitignore
Created February 24, 2014 05:28
Git ignore file for when I start doing python development
# OS generated files
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
@mickeypash
mickeypash / Problem 2
Created October 18, 2012 08:51
How to do the data frame
x <- data.frame(SubjID=1:20
Student=factor(rep(c("Freshmen","Sophomores"
"Junior","Seniors"),each=5)),
Y=c(32,30,28,30,25,27,27,30,30,21,27,22,23,23,25,22,20,22,23,13))