How to calculate Standard error of mean as shown in minitab website
227 views (last 30 days)
Show older comments
Hi, I trying to recreate the minitab formula(so that I can use it in Matlab) for calculating standard error of mean as shown in this link Step 2 ( http://support.minitab.com/en-us/minitab-express/1/help-and-how-to/modeling-statistics/anova/how-to/two-way-anova/interpret-the-results/key-results/ ). However, I am unable to get the answer as shown on the web ? is there anyone who knows how ?
0 Comments
Answers (2)
Star Strider
on 18 Dec 2016
The Minitab site doesn’t show the calculation, so I assume it’s the usual definition:
data = rand(1, 10);
SEM = std(data)/sqrt(length(data)); % Standard Error Of The Mean
5 Comments
Liam Walsh
2 minutes ago
To summarize the discussion above, it seems like you are looking to replicate the two-way ANOVA example in Minitab, and get some standard error estimates for the mean. You can do this my making use of the anova2 function or the anova object. Below is an example on how to use the object, which contains a display with several standard quantities in ANOVA including the mean squares value, along with properties and object methods that can be used to examine other quantities in the analysis:
% Load sample data
load popcorn.mat
brand = [repmat("Gourmet",6,1);repmat("National",6,1);repmat("Generic",6,1)];
poppertype = [repmat("Air",3,1);repmat("Oil",3,1);repmat("Air",3,1);repmat("Oil",3,1);repmat("Air",3,1);repmat("Oil",3,1)];
factors = {brand,poppertype};
% Create anova object and show the display, which contains the mean squares
% values
aov = anova(factors,popcorn(:),FactorNames=["Brand" "PopperType"])
% Get a table containing the mean squares values
tbl = stats(aov)
% To get a similar table without the object, you can use anova2
anova2(popcorn, 3)
0 Comments
See Also
Categories
Find more on Analysis of Variance and Covariance 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!