Multiple functions in stats toolbox not working, despite active license?
7 views (last 30 days)
Show older comments
Hi,
I am running matlab R2018b on my Mac OS with Stats toolbox installed. It was working great for a while but recently it has been giving me errors when I am trying to check assumptions of ANOVA, both for vartestn() and stats.resid.
Here is the code:
[p stat] = vartestn(percent_abs(1,1:63)', 'TestType', 'LeveneAbsolute')
%show equality of variance necessary for ANOVA
res = stats.resid(percent_abs(1,1:63));
%Find residuals of data.
figure(6)
normplot(res)
title('Normal Probabilty Plot for Residuals')
%Plot normality of residuals
I can run vartestn without the test type, but I need to be able to run the Levene test. Here is the error it gives me.
Undefined function or variable 'testname'.
Error in vartestn (line 272)
Table{k+4,1} = testname;
Error in (line 85)
[p stat] = vartestn(percent_abs(1,1:63)', 'TestType', 'LeveneAbsolute')
I also get: Undefined variable "stats" or class "stats.resid".
I've made sure that the toolbox was downloaded and activated. I have used this exact code and these functions before and it worked with no issues. I am thinking it is a toolbox problem since the error refers me to the function in the toolbox for the vartest? Any thoughts would be helpful, TIA.
0 Comments
Answers (1)
Star Strider
on 5 Dec 2020
Run these commands from you Caommand Window or a script:
restoredefaultpath
rehash toolboxcache
If you are still having problems after that, use the Contact Support link to request Technical Support.
2 Comments
See Also
Categories
Find more on ANOVA in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!