# MSB and MSW via ANOVA

i tried to figure out how to get the MSB(mean square between Groups)) and MSW(mean square within Groups and between subgroups) using ANOVA in R. My dataset has one dependent variable Y and two factors A(with values of 1 and 2) and a subgroup of A, B(with values of 1:5). My data is balanced, thus i have the same number of observations for each group and subgroup. My first idea was to fit a nested anova like Y~A+A/B. I would appreciate any help.

Thanks!

Paul

• Is this a question about extracting statistics from R objects or is it about what model to choose? – whuber Jan 27 '18 at 16:26
• It´s about the model to choose. I implemented the above model, but iam not sure if i got the right values for my case. For Explanation iam running a Simulation study to validate Paul von Hippels findings about variance estimates unter bootstrap MLMI (projects.iq.harvard.edu/applied.stats.workshop-gov3009/…). And i have Problems to reconstruct this using ANOVA in R :MSB is the mean square between the bootstrapped datasets, df = B−1, and MSW is the mean square within the bootstrapped datasets and between the imputed datasets,df = B(M − 1). – Franz Jan 27 '18 at 16:45
• Please edit your post to include those details. I suspect no readers will suspect these are what you mean by "MSB" and "MSW" (which ordinarily would be interpreted as "between sum of squares" and "within sum of squares" for an ANOVA). When you do this, please reconsider your choice of tags: for instance, what does this question have to do with MANOVA? – whuber Jan 27 '18 at 17:19
• Thanks for the tip! I added MANOVA because Hippel did that too. But you are right, in my case MANOVA is the wrong tag. I never heard that MSB and MSW would be interpreted as "sum of", that would be SSb and SSw. – Franz Jan 27 '18 at 18:31
• Sorry--I did intend to write "mean" instead of "sum". – whuber Jan 27 '18 at 18:53