MATLAB Answers

ranova(rm) ranovatbl contains only NaN values and zero's

6 views (last 30 days)
Thomas61197 on 31 Mar 2020
Commented: Thomas61197 on 1 Apr 2020
ranova(rm) outputs a ranova table containing only NaN values and zero's:
ranovatbl =
3×8 table
SumSq DF MeanSq F pValue pValueGG pValueHF pValueLB
_____ __ ______ ___ ______ ________ ________ ________
(Intercept):ReactionTime 0 0 NaN NaN NaN NaN NaN NaN
ReactionTimes_Indicator:ReactionTime 0 0 NaN NaN NaN NaN NaN NaN
Error(ReactionTime) 0 0 NaN
This is my rm fit:
allRTSLong.ReactionTimes_Indicator = categorical(allRTSLong.ReactionTimes_Indicator);
Meas = table([1]','VariableNames',{'ReactionTime'});
rmRTS = fitrm(allRTSLong, 'ReactionTimes ~ ReactionTimes_Indicator', 'WithinDesign', Meas)
[ranovatbl] = ranova(rmRTS)
This is what the first 10 rows of allRTSLong look like:
>> allRTSLong(1:10, :)
ans =
10×2 table
ReactionTimes_Indicator ReactionTimes
_______________________ _____________
Visual 0.3745
Auditory 0.057861
Audiovisual 0.44841
Visual 0.33798
Auditory 0.20852
Audiovisual 0.16943
Visual 0.3462
Auditory 0.1226
Audiovisual 0.66347
Visual 0.36488
I've tried making ReactionTimes_indicator catagorical, tried various different inputs instead of 'Meas'. Nothing has worked so far. I've looked everywhere on the internet but i couldn't find any solutions.
Also, all data are from one mouse. Am i even using the right test?


Sign in to comment.

Accepted Answer

Jeff Miller
Jeff Miller on 31 Mar 2020
> 'WithinDesign', Meas
This doesn't look right with Meas only having one possibility. Try removing that.
> all data are from one mouse. Am i even using the right test?
I don't think so. The analysis you are doing is for situations where you have many randomly selected subject/mice and multiple measures on each one. If you have only one mouse, then the trials are the only source of random variation in the data set so the trials are the "subjects" and it is essentially a between-Ss design (i.e., each trial is only tested in one condition). But the results of the ANOVA will only tell you about systematic effects for this one mouse, and you will have no statistical basis for generalizing to other mice. For that, you would need multiple mice.

More Answers (0)

Sign in to answer this question.