Type III sum of squares for all predictors using regstats

3 views (last 30 days)
Hi All, I'm running regstats with an 18 column x predictor and would like to obtain the type III sum of squares for each predictor in the model. Regstats just gives the overall value for the model, and when I tried using anovan Matlab keeps running out of memory. Is there a simpler way?

Accepted Answer

Tom Lane
Tom Lane on 31 Jan 2012
Aloha. You've run into the issue that regstats doesn't want to do anova, and anovan wants to treat its x variables as categorical. But you can tell it not do do that:
x = randn(100,5);
y = 10 + x*(1./(1:5)') + 5*randn(100,1);
anovan(y,x,'continuous',1:5)

More Answers (0)

Community Treasure Hunt

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

Start Hunting!