Skip to content
Snippets Groups Projects
Commit cd509b8b authored by RomanV's avatar RomanV
Browse files

Update of the filestructure

parent be083837
Branches master
No related tags found
No related merge requests found
Showing
with 15619 additions and 5 deletions
ResultsPre
*.xls
*.mat
*.asv
*.jpg
*.png
*.avi
\ No newline at end of file
......@@ -20,8 +20,8 @@ library(plyr)
# aov + stat https://www.sas.upenn.edu/~baron/from_cattell/rpsych/rpsych.html
# Load Data
dir <- "C:/Users/rvakhru/Desktop/Exp10_FrameSize_200718_30c708_EYE/"
setwd(dir)
fileLoc <- "W:/#Common/Projects/Behavioral/Data/Exp10_FrameSize_200718_30c708_EYE"
setwd(fileLoc)
data <- read.delim("sizeData.txt")
# Change data representation
......@@ -42,18 +42,18 @@ tData$Type <- mapvalues(tData$Type, from = c('V','A','N'), to = c("Visual", "Sou
tData$Reward <- mapvalues(tData$Reward, from = c('N','L','H'), to = c("No", "Low","High"))
#Select PostCond
tData <- tData[which(tData$Prepost==2),]
#tData <- tData[which(tData$Prepost==2),]
## AOV 2-way ANOVA
#If you have balanced data, the factors are uncorrelated (e.g. due to random assignment),
# and none of your within-subject factors has more that 2 levels, you can use aov().
m <- aov(value~Size*Type,data = tData) # +Error(Pp) and expMode Problem
m <- aov(value~Size*Type*Reward+Error(expMode*Prepost),data = tData) # +Error(Pp) and expMode Problem
summary(m)
etaSquared(m, anova = TRUE)
TukeyHSD(m)
# Plot interaction with (1)gplots, (2)standart package, (3)ggplot2
plotmeans(value~Type,data = tData, connect=FALSE)
plotmeans(value~Reward,data = tData, connect=T)
interaction.plot(tData$Size,tData$Type,tData$value, type="b", col=c(1:3),
leg.bty="o", leg.bg="beige", lwd=2, pch=c(18,24,22),
xlab="Frame Size",ylab="dPrime",main="Interaction Plot")
......
# Script erited for Experimetn 10 Analisys FrameSize
# VAkhrushev Roman
# 21.08.18
library(reshape) # melt
library(stringr)
library(gplots) # plotmeans
library(lsr) # etaSquared
library(pwr) # pwr
library(ez) # ezAnova
library(afex) # mixed
library(Hmisc)
library(wesanderson)
library(tidyverse)
library(plyr)
# Banch of courses for tidyvers and friends https://monashbioinformaticsplatform.github.io/r-more/
# Harward tutorials https://tutorials.iq.harvard.edu
# See: http://talklab.psy.gla.ac.uk/r_training/anova/index.html compare ezAnova/aov/SPSS
# aov + stat https://www.sas.upenn.edu/~baron/from_cattell/rpsych/rpsych.html
# Load Data
#Exp10
fileLoc <- "W:/#Common/Projects/Vakhrushev/Exp11_EEG_EYE_Circle/DATA_F/"
setwd(fileLoc)
data <- read.delim("sizeData.txt")
# Change data representation
#tData <- melt(data, id = c('Pp','Acc','RewS','RewV'))
tData <- melt(data, id = c('numPp','Pp','expMode','Prepost','RewS','RewV'))
tData <- separate(tData,variable,c('Modality','Reward'),sep="_",remove=T)
#Transform to factors
tData$Pp <- as.factor(tData$Pp)
tData$RewS <- as.factor(tData$RewS)
tData$RewV <- as.factor(tData$RewV)
tData$Reward <- as.factor(tData$Reward)
tData$Modality <- as.factor(tData$Modality)
tData$Prepost <- as.factor(tData$Prepost)
#tData$Time <- factor(tData$Time, levels = c('L','P','Z','N'))
# Map Values
tData$Prepost <- mapvalues(tData$Prepost, from = c('1','2'), to = c("Before", "After"))
tData$Modality <- mapvalues(tData$Modality, from = c('V','A'), to = c("Visual", "Sound"))
tData$Reward <- mapvalues(tData$Reward, from = c('L','H'), to = c("Low","High"))
#Select PostCond
tData <- tData[which(tData$Prepost=='After'),]
tData <- tData[which(tData$Reward!='N'),]
## ezANOVA rANOVA
# to replicate the output from SPSS, then your best bet is to use ez::ezANOVA(),
# because it provides Greenhouse-Geiser correction in case you have more than three levels of a within-subject factor,
# and handles unbalanced data more easily.
#1
rm(res)
res = ezANOVA(data = tData, dv = value, detailed = T, wid = .(Pp), within = .(Reward,Modality), type = 2, return_aov = F)
print(res)
#2
rm(res)
res = ezANOVA(data = tData, dv = value, detailed = T, wid = .(Pp), within_covariates = Prepost, within = .(Reward,Modality), type = 2, return_aov = F)
print(res)
#3
rm(res)
res = ezANOVA(data = tData, dv = value, detailed = T, wid = .(Pp),between = .(RewV, RewS), within_covariates = PrePost, within = .(Reward,Modality), type = 2, return_aov = F)
print(res)
#4
rm(res)
res = ezANOVA(data = tData, dv = value, detailed = T, wid = .(Pp),between_covariates = .(RewV, RewS), within = .(Reward,Modality), type = 2, return_aov = F)
print(res)
# Mixed-effects analysis mANOVA
# When number of trials is unbalanced
mod <- mixed(value ~ Reward*Modality + (1|Pp), tData, type = 2, method = "KR")
summary(mod)
print(mod,correlation=TRUE)
## AOV 2-way ANOVA
#If you have balanced data, the factors are uncorrelated (e.g. due to random assignment),
# and none of your within-subject factors has more that 2 levels, you can use aov().
#2
m <- aov(value~(Reward*Modality)+Error(Pp/(PrePost*Modality*Reward)),data = tData) # +Error(Pp) and expMode Problem
summary(m)
#etaSquared(m, anova = TRUE)
#TukeyHSD(m)
#3
rm(m)
options(contrasts = c("contr.sum","contr.poly"))
m <- aov(value~(Modality*Reward*PrePost*Acc*RewS*RewV)+Error((Pp)/(Modality*Reward*PrePost)),data = tData,contrasts = contr.sum) # +Error(Pp) and expMode Problem
summary(m)
#4
rm(m)
options(contrasts = c("contr.sum","contr.poly"))
m <- aov(value~(Modality*Reward*Acc)+Error((Pp)/(Modality*Reward)),data = tData) # +Error(Pp) and expMode Problem
summary(m)
R.matlab::readMat('between.mat')
# Plot interaction with (1)gplots, (2)standart package, (3)ggplot2
plotmeans(value~Reward,data = tData, connect=FALSE)
pd = position_dodge(0.1)
ggplot(tData,aes(x = Reward, y = value, color = Modality)) +
stat_summary(position = pd,fun.y = mean, geom = 'point', fill = 'skyblue',pch=15,size = 2) +
stat_summary(position = pd,fun.data = mean_cl_normal, fun.args = list(mult = 1), geom = 'errorbar',width = 0.3,size = 1)+
#stat_summary(position = pd,fun.y = mean, geom = "line",aes(group = interaction(Reward,Modality)),size = 1)+
theme_classic()
# Test for the balance
ezDesign(data = tData, x = Reward, y = PrePost, row = Modality)
# Power test
pwr.anova.test(k = 2, f= 0.114, sig.level = 0.05, power = 0.80)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
%% A little bit of GUI
close all;
variab = menu('What?', {'Accuracy','RT','keyPressed','dist'}); variabInd = {'Accuracy','RT','keyPressed','dist'};
prePost = menu('Conditioning?', {'Pre','Post','Conditioning'});
%% Load Data
myPath= 'W:\#Common\Projects\Vakhrushev\Exp11_EEG_EYE_Circle\DATA'; % Folder with subjects
Pp = {'163250929','19997234','215370668','233910659','418529483','855920445'}; % Selected subjects
condInd = {'neutral','VisLowVal','VisHighVal','SndLowVal','SndHighVal'}; % Naiming convention for my conditions
condVal = {[9 10], [1 5], [2 6], [3 7], [4 8]}; % And their representation in triggers
meanVal = struct;
%% Calculate performance
for PpFor = 1:length(Pp)
allBlock = [];
% Extract block structure
load([myPath filesep Pp{PpFor} filesep Pp{PpFor} '__allDataEyE.mat']); % Load file with participant's data (eyeLink+)
for blo = 2:length(block), allBlock = [allBlock block(blo).trials]; end % Combine trials in one block
% Remove error
allBlock = allBlock([allBlock.BlPrePost] == prePost); % Select desired blocks
allBlock = allBlock([allBlock.error]==0); % Remove error trials
allBlock = allBlock(abs(zscore([allBlock.RT]))<300 & [allBlock.dist]<1); % Remove Eye movements
% Mean performance per condition
for condFor = 1:length(condInd)
meanVal(PpFor).(condInd{condFor}) = ...
nanmean([allBlock(ismember([allBlock.conditionType],condVal{condFor})).(variabInd{variab})]); % sum trials per condition
end
end
meanValues = [nanmean([meanVal.neutral]) nanmean([meanVal.VisHighVal]) nanmean([meanVal.VisLowVal]) nanmean([meanVal.SndHighVal]) nanmean([meanVal.SndLowVal])];
stdValues = [nanstd([meanVal.neutral]) nanstd([meanVal.VisHighVal]) nanstd([meanVal.VisLowVal]) nanstd([meanVal.SndHighVal]) nanstd([meanVal.SndLowVal])]./sqrt(length(Pp));
%% PLOT
bar(1:5,meanValues,'w'), hold on
errorbar(1:5,meanValues,stdValues,'k','linewidth',3, 'linestyle','none')
ax = gca;
ax.XTickLabel = {'Neut','VisHighVal','VisLowVal','AudioHighVal','AudioLowVal'};
ax.YLim = [min(meanValues)-min(stdValues) max(meanValues)+max(stdValues)]; % Adjust the scale
hline(nanmean([meanVal.neutral]));
ylabel((variabInd{variab}) , 'FontSize', 14);
ax = gca;
title('Effect of Reward value and modality', 'FontSize', 16);
[~, p1]= ttest([meanVal.VisHighVal],[meanVal.VisLowVal]); % Performing t-test High-low VISUAL
[~, p2]= ttest([meanVal.SndHighVal],[meanVal.SndLowVal]); % Performing t-test High-low SOUND
title(['PrePost(' num2str(prePost)...
') N= ' num2str(length(Pp)) ', V(' num2str(round(p1,2)) ') S(' num2str(round(p2,2)) ')']);
\ No newline at end of file
This diff is collapsed.
%%%%Correction of 1 or 0 Hit or Fa rate adapted from:
function [DP]=Dprime2(Phit,Pfa,N)
if Phit==1
Phit=1-(1/(2*N));
elseif Phit==0
Phit=1/(2*N);
end
if Pfa==1
Pfa=1-(1/(2*N));
elseif Pfa==0
Pfa=(1/(2*N));
end
ZHit=norminv(Phit,0,1);
ZFa=norminv(Pfa,0,1);
DP=abs(ZHit-ZFa);
exp HV LV HA LA
2 0.79688 0.76563 0.78125 0.78125
2 0.89063 0.89063 0.84375 0.92188
2 0.92188 0.95313 0.98438 0.92188
2 0.79688 0.81250 0.82813 0.78125
2 0.89063 0.90625 0.79688 0.85938
2 0.82813 0.78125 0.75000 0.78125
2 0.82813 0.78125 0.87500 0.89063
2 0.81250 0.90625 0.79688 0.82813
2 0.65625 0.65625 0.64063 0.64063
2 0.59375 0.71875 0.79688 0.59375
2 0.85938 0.92188 0.90625 0.82813
2 0.81250 0.84375 0.80952 0.76563
2 0.67188 0.68750 0.75000 0.70313
2 0.90625 0.96875 0.92188 0.87500
2 0.73438 0.75000 0.68750 0.64063
2 0.75000 0.68750 0.78125 0.71875
2 0.67188 0.70313 0.71875 0.73438
2 0.89063 0.87500 0.82813 0.90625
2 0.78125 0.84375 0.84375 0.70313
2 0.71875 0.73438 0.71875 0.68750
2 0.68750 0.75000 0.64063 0.73438
2 0.87500 0.85938 0.90625 0.89063
2 0.73438 0.79688 0.82813 0.68750
2 0.65625 0.70313 0.68750 0.67188
2 0.76563 0.79688 0.71875 0.70313
2 0.87500 0.90625 0.81250 0.82813
2 0.90625 0.79688 0.78125 0.79688
2 0.60938 0.78125 0.64063 0.64063
2 0.71875 0.65625 0.73438 0.73438
2 0.75000 0.85938 0.84375 0.76563
2 0.84375 0.84375 0.79688 0.85938
2 0.70313 0.78125 0.79688 0.78125
2 0.82813 0.95313 0.73438 0.82813
2 0.70313 0.70313 0.56250 0.57813
2 0.85938 0.90625 0.87500 0.93750
2 0.89063 0.85938 0.93750 0.89063
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
14,89,79.47,8.09,20.23,23.35,42.62,-0.26,32.17,16.87,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
12,99,7.11,37.34,14.95,10.83,38.45,-0.26,-34.66,57.87,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
13,87,37.44,23.1,29.17,17.87,14.72,11.35,-8.95,-15.12,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
14,110,18.06,-4.82,34.85,37.48,-8.79,25.73,24.17,-0.29,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
15,101,12.17,4.4,10.68,22.04,40.89,-13.06,-6.11,1.02,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
13,102,42.2,-14.11,35.15,9.66,10.58,15.13,39.06,25.39,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
15,98,-46.08,-7.41,-27.75,-12.8,1.54,-9.38,1.99,-18.07,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
7,97,24.84,19.73,33.89,11.4,-0.14,-11.85,-9.35,31.82,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
14,85,42.39,26.21,40.38,22.16,27.75,-0.34,16.75,28.18,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
17,95,6.66,2.79,18.06,15.73,-4.31,-10.89,18.06,-1.68,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
8,117,29.33,2.56,7.39,1.45,-22.52,-65.8,-17.67,-47,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
9,98,24.93,59.17,20.51,36.32,25.65,15.47,23.14,38.13,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
14,97,-1.34,-9.2,-6.15,4.9,-0.12,4.9,30.19,27.72,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
15,95,66.29,16.71,1.82,18.01,48.82,-8.18,25.81,32.37,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
16,96,7.32,-2.08,13.18,0.47,11.49,6.87,-17.56,47.15,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
14,88,-10.66,17.54,-15.32,-12.97,55.99,-10.28,-29.46,-0.45,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
14,87,34.39,35.8,-25.51,-16.75,8.95,-36.89,17.9,7.31,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
13,105,12.03,58.28,-2.07,-4.53,20.98,-13.61,27.61,22.05,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
14,107,16.15,-9.28,-8.32,9.05,-28.08,-3.85,5.1,2.41,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
15,90,61.02,25.9,-20.2,-20.2,-25.52,14.5,16.25,-30.95,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
12,103,-3.1,-7.57,-6.39,-16.87,-38.492,-47.186,-35.99,-43.258,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
14,109,27.22,63.46,16.67,42.45,-23.476,-22.656,-16.914,-21.672,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
15,108,-28.06,-32.68,-31.15,-8.92,-28.974,-27.132,-17.514,-17.636,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
15,95,83,20.08,-22.09,0.87,-11.954,-32.508,-22.154,-17.74,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
13,102,-2.79,-13.01,6.75,-17.99,-28.178,-24.17,-32.192,-13.492,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
13,92,-44.52,25.94,-47.99,-31.71,-7.748,-28.084,-36.23,-26.16,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
20,89,67.92,50.7,-31.09,-25.43,-20.81,-33.468,-18.17,-19.34,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
7,107,-2.82,69.11,-28.49,-20.94,-17.38,-26.586,-14.468,-20.256,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
21,100,-4.12,-34.19,-39.84,-4.67,-34.632,-24.552,-23.576,-25.526,
"Age","IQ","Group","Gender","y1","y2","y3","y4","y5","y6","y7","y8",
15,100,81.04,30.3,-46.48,-45.31,-30.654,-17.99,-20.36,-32.548,
This diff is collapsed.
clearvars
close all
process = 'T:\#Common\Projects\Vakhrushev\Exp11_EEG_EYE_Circle\DATA\';
process = uigetdir(process);process = [process filesep];
uniName = inputdlg('Pick A Unique Name','Normal');
timeWind = [-.1 0.8]; filter = [.2 35]; mybaseline =[-100 0];
TrPreC = {'S 11','S 12','S 13','S 14','S 15','S 16','S 17','S 18','S 19','S 20'}; TrPreCex = {'ViLoL','ViHiL','AuLoL','AuHiL','ViLoR','ViHiR','AuLoR','AuHiR','NeutL','NeutR'};
TrPost = {'S 41','S 42','S 43','S 44','S 45','S 46','S 47','S 48','S 49','S 50'}; TrPostex = {'ViLoL','ViHiL','AuLoL','AuHiL','ViLoR','ViHiR','AuLoR','AuHiR','NeutL','NeutR'};
TrCond = {'S 71','S 72','S 73','S 74','S 75','S 76','S 77','S 78'}; TrCondex = {'ViLoL','ViHiL','AuLoL','AuHiL','ViLoR','ViHiR','AuLoR','AuHiR'};
PrePost = {TrPreC,TrPost,TrCond}; PrePostex = {TrPreCex,TrPostex,TrCondex}; PrePostText = {'TrPre','TrPost','TrCond'}; %,TrPost,TrCond ,TrPostex,TrCondex ,'TrPost','TrCond'
%% Preprocess EEG Data
EEGDataProcessing('load', process,'sampling',1000, 'epoch',timeWind, 'filter', filter, 'events', [PrePost{:}], 'ref', [] ,'pName', uniName{:});
%% Create STUDIES
if 0 == exist([process filesep 'Studies'],'dir'),mkdir([process filesep 'Studies']); end
load([process 'doneFileEEG_' uniName{:} '.mat']);
[tmp, tmpval] = pop_chansel({doneFileEEG.Pp}, 'withindex', 'on');
doneFileEEG = doneFileEEG(tmp);
for session = 1:length(PrePost) % for Pre-Post-Cond
triggers = PrePost{session}; indexcount=0; STUDY = [];ALLEEG = [];
mystr =cell(1,length(doneFileEEG)*length(triggers));
for subs = 1:length(doneFileEEG) % For each Pp
if subs<10,subname = ['0' num2str(subs)];else subname = num2str(subs);end
for conds = 1:length(triggers) % For each trigger
indexcount=indexcount+1;
if any(strcmp(triggers(conds), {'S 11' 'S 12' 'S 15' 'S 16' 'S 41' 'S 42' 'S 45' 'S 46' 'S 71' 'S 72' 'S 75' 'S 76'})); modality = 'visual'; else modality = 'sound'; end
if any(strcmp(triggers(conds), {'S 11' 'S 13' 'S 15' 'S 17' 'S 41' 'S 43' 'S 45' 'S 47' 'S 71' 'S 73' 'S 75' 'S 77'})); value = 'low'; else value = 'high'; end
if any(strcmp(triggers(conds), {'S 11' 'S 12' 'S 13' 'S 14' 'S 19' 'S 41' 'S 42' 'S 43' 'S 44' 'S 49' 'S 71' 'S 72' 'S 73' 'S 74'})); side = 'left'; else side = 'right'; end
if any(strcmp(triggers(conds), {'S 11' 'S 12' 'S 13' 'S 14' 'S 15' 'S 16' 'S 17' 'S 18' 'S 19' 'S 20'})); learn = 1; elseif any(strcmp(triggers(conds),{'S 71','S 72','S 73','S 74','S 75','S 76','S 77','S 78','S 79'})), learn = 0; else learn = 2; end
if any(strcmp(triggers(conds), {'S 19' 'S 20' 'S 49' 'S 50'})); value = 'no'; modality = 'neutral'; end
mystr{indexcount}={'index' indexcount 'load' [process [doneFileEEG(subs).Pp] filesep 'EEG' filesep 'PreProcessed' uniName{:} filesep [doneFileEEG(subs).Pp] '_' triggers{conds} '.set']...
'subject' subname 'session' [] 'condition' triggers{conds}}; % trigger-by-trigger task
end
end
% Create study with commands for all triggers
[STUDY, ALLEEG] = std_editset(STUDY, ALLEEG, 'name',[process num2str(length(doneFileEEG)) 'Pp_' PrePostText{session} '_' num2str(date) '.study'],'commands',...
mystr, 'updatedat','on','rmclust','on');
STUDY.conditionEx = PrePostex{session};
% Precompilation (necessarz for data continuity)
[STUDY, ALLEEG] = std_precomp(STUDY, ALLEEG, {},'interp','on','recompute','on','erp','on','erpparams',{'rmbase' mybaseline });
% Save study
[STUDY, ALLEEG] = pop_savestudy(STUDY, ALLEEG, 'filename', [PrePostText{session} '_' uniName{:} '.study'],'filepath',[process 'Studies']);
end
disp('STRUCTURES CREATED');
%% Triggers meanings
% S11: Vis LowV LEFT
% S12: Vis HigV LEFT
% S13: Aud LowV LEFT
% S14: Aud HigV LEFT
% S15: Vis LowV RIGHT
% S16: Vis HigV RIGHT
% S17: Aud LowV RIGHT
% S18: Aud HigV RIGHT
% S19: Neut LEFT
% S20: Neut RIGHT
%
% S21: Vis LowV LEFT
% S22: Vis HigV LEFT
% S23: Aud LowV LEFT
% S24: Aud HigV LEFT
% S25: Vis LowV RIGHT
% S26: Vis HigV RIGHT
% S27: Aud LowV RIGHT
% S28: Aud HigV RIGHT
% S29: Neut LEFT
% S30: Neut RIGHT
% S71: Vis LowV LEFT
% S72: Vis HigV LEFT
% S73: Aud LowV LEFT
% S15: Vis LowV RIGHT
% S16: Vis HigV RIGHT
% S17: Aud LowV RIGHT
% S18: Aud HigV RIGHT
\ No newline at end of file
[process, locat] = uigetfile('T:\#Common\Projects\Vakhrushev\Exp11_EEG_EYE_Circle\DATA\Studies\*.*');
% if ~any(exist('STUDY','var') && strcmp(process, processed))
[STUDY, ALLEEG] = pop_loadstudy('filename', process,'filepath',locat); processed = process; name = strsplit(process,'.'); name = name{1};
% end
mychans = {STUDY.changrp.name};
mysubs ={ALLEEG.filepath};
% [~,index] = sortrows(mychans.'); channels = mychans(index); clear index
% [tmp, tmpval] = pop_chansel(channels, 'withindex', 'on');
%% Plot data
% [STUDY, ALLEEG] = pop_loadstudy('filename', process,'filepath',locat);
STUDY = pop_statparams(STUDY, 'condstats','on','mcorrect','none','alpha',0.05);
STUDY = pop_erpparams(STUDY, 'plotconditions','together','topotime',[]);
[STUDY, erpdata, erptimes] = std_erpplot(STUDY,ALLEEG,'channels', mychans, 'noplot', 'on');
save([locat 'EEGPlootPlot_test' name '.mat'],'mychans','mysubs','erpdata','erptimes','locat','process');
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment