Type III sum of squares for all predictors using regstats

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

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)

Categories

Find more on Deployment, Integration, and Supported Hardware 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!