You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: matlab/readme.md
+54-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
2
-
Data Pre-Processing Scripts:
2
+
## Data Pre-Processing Scripts:
3
3
4
4
These are used with matlab to pre-process raw data from the EEG study.
5
5
To use:
@@ -87,3 +87,56 @@ Matlab will then process the video with frame numbers so that you can get the pr
87
87
88
88
-
89
89
90
+
91
+
## tableau
92
+
93
+
scripts created to prepare csv for tableau
94
+
95
+
***
96
+
97
+
Before you start
98
+
99
+
***
100
+
- Add `processed_data_pxx` to path (right click Add to Path, selected folders and subfolders, icon solidifies to indicate added to path)
101
+
- Directory structure (for folders related to tableau)
102
+
```
103
+
-- matlab
104
+
|-- tableau
105
+
| |-- xxx.m
106
+
| |-- xxx.csv
107
+
|-- experiments
108
+
|-- xxx.m
109
+
|-- results
110
+
|-- xxx.csv
111
+
```
112
+
***
113
+
114
+
Event x joystick analysis
115
+
116
+
***
117
+
118
+
`matlab/experiments/event_joystick.m`
119
+
120
+
1. Extracting joystick data
121
+
- For every event of each participant, extract joystick data around the event timestamp
122
+
- Compare four time windows (250ms, 500ms, 750ms, 1000ms before and 5000ms after the event timestamp)
123
+
- `abs`: max value of joystick data in time window
124
+
- `variance`: variance of joystick data in time window
125
+
- `slp`: end - start / time in a time window
126
+
- `slp2`: average of slopes of every 2 adjacent points in time window
127
+
- Output saved in `event_joystick_asym.csv`
128
+
2. Spread in time window
129
+
- Calculate spread of joystick data for events that have been experienced by at least 16 participants
130
+
- Record abs, var, slp for each of four time windows
131
+
- Output saved in `ej_spread_5500_9500.csv`
132
+
3. Normality testing
133
+
- [Shapiro-Wilk test](https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/13964/versions/2/previews/swtest.m/index.html) at alpha = 0.05. It has the best power for a given significance compared to other normality tests.
134
+
- Perform normality testing on value (`abs`) and variance (`var`) with time window 1s before and 5s after
135
+
- Output saved in `event_x_joystick.csv`
136
+
- Interpretation:
137
+
- "h-abs/h-var" refers to the results of the normality hypothesis testing - 0 means the null hypothesis is NOT rejected and p>0.05, and hence the distribution is NORMAL. "p-abs/p-var" are p-values.
138
+
- "kurt-abs/kurt-var" is kurtosis - kurt > 3 means the distribution is more outlier-prone than standard normal distribution (aka the distribution is heavier tailed than standard normal) and vice versa.
139
+
- "skew-abs/skew-var" is skewness of the distribution - negative means skewed to the left, positive means skewed to the right
140
+
- "spread-abs/spread-var" is based on the results of the normality testing
0 commit comments