MATLAB Answers

Unable to access Stats toolbox functions

3 views (last 30 days)
Craig
Craig on 24 May 2016
Answered: Tom Lane on 24 Jun 2016
Hi everyone, I'm a bit perplexed.
I'm not able to use statistics functions. I'm seeing things like this:
>> help anova
anova not found.
Use the Help browser search field to search the documentation, or
type "help help" for help command options, such as help for methods.
>> help ranova
ranova not found.
Use the Help browser search field to search the documentation, or
type "help help" for help command options, such as help for methods.
Yet I have the Stats toolbox installed and it is in the search path.
>> ver
----------------------------------------------------------------------------------------------------
MATLAB Version: 9.0.0.341360 (R2016a)
MATLAB License Number: ••••••
Operating System: Microsoft Windows 7 Home Premium Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB Version 9.0 (R2016a)
Signal Processing Toolbox Version 7.2 (R2016a)
Statistics and Machine Learning Toolbox Version 10.2 (R2016a)
Wavelet Toolbox Version 4.16 (R2016a)
However, when I try
>> doc anova
The interactive help comes up just fine!
If anyone knows why this is happening and what I can do about it, please let me know!
Thanks in advance.

Answers (2)

Tom Lane
Tom Lane on 24 Jun 2016
The toolbox has functions anova1, anova2, anovan, and rmanova among others. It does not have functions anova or ranova.
However, there are objects that have methods by these names. You can use anova on a LinearModel, or ranova on a RepeatedMeasuresModel. It looks like when you ask for "doc" using these names, the methods for these objects come up.

Image Analyst
Image Analyst on 24 May 2016
Make a new script file and run this and tell us what it says
% Check that user has the Toolbox installed and licensed.
hasToolbox = license('test','Statistics_toolbox')
if ~hasToolbox
% User does not have the toolbox installed.
message = sprintf('Sorry, but you do not seem to have a license for the Statistics and Machine Learning Toolbox.\nDo you want to try to continue anyway?');
reply = questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes');
if strcmpi(reply, 'No')
% User said No, so exit.
return;
end
end
  1 Comment
Craig
Craig on 24 May 2016
Hi, thanks for responding. I'm getting this:
hasToolbox =
1

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!