Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

How can I create ANOVA table using the syntax "mdl=Linea​rModel.fit​(X,y,anova​type) and "tbl=anova​(mdl,anova​type)". My matlab version is 7

Asked by Chimezie Umezie on 18 Aug 2012

I want to create an ANOVA table to enable carry out model adequacy checking using Lack of Fit sum of squares and pure error sum of squares of a dataset using the

“tbl=anova(mdl,anovatype)” syntax and mdl=LinearModel.fit(X, y) where X is Matrix of predictor values and y is Vector of response values with the same number of rows as X. I have followed the syntax provided in the following links :

http://www.mathworks.com/help/toolbox/stats/linearmodel.fit.html & http://www.mathworks.com/help/toolbox/stats/linearmodel.anova.html

but I get this error message “??? Undefined variable "LinearModel" or class "LinearModel.fit".”

I even tried using the example in the above link and the message is the same. I do not know where the problem lies. I would really appreciate if someone could guide me in solving this problem. I am using Matlab version 7.5.Below is the case study.

Case study Model type: Linear Control variables are Conc and Speed and the response is the yield. Conc=[45 55 45 55 50 50 50]';Speed=[90 90 110 110 100 100 100]'; yield=[69 59 78 67 68 66 69]'; Seven runs were carried out, three of these being replicate measurements at the center point.

0 Comments

Chimezie Umezie

Products

No products are associated with this question.

1 Answer

Answer by Oleg Komarov on 18 Aug 2012
Edited by Oleg Komarov on 18 Aug 2012
Accepted answer

Not available for your version. Consider browsing the documentation of your release: http://www.mathworks.co.uk/help/doc-archives.html

On R2011a you have ANOVA.

0 Comments

Oleg Komarov

Contact us