I'm trying to understand something related to a one-way repeated measures ANOVA.

I have one group and two scores over time. In SPSS (and this code) you input every subject's score on one row with each column being the next measurement in time. If I use anovan (built in RM analysis within Matlab) I can do the same thing but have to instead put all data sequentially in a line (row or column does not matter as long as every subject's score follows each other) and create a file the same length as my data file with the condition order.

This doesn't actually change anything a part from the df (which are doubled in anovan since I spread the data in 1 line rather than 2 equal columns) however it also gives different results in the p value (nothing drastic but still different).

Any ideas why anovan and this code producing different results while this code and SPSS produce the same results? THANKS!

I've attempted to use loadjson.m but I keep getting the error at line 47 saying "input file does not exist". All I am doing is "data = loadjson('data(5).json')" and that data file is within the same directory. Please help (or redirect me to where I should type my question if this is not the appropriate place). Many thanks!