Confidence Interval on the mean curve (SSANOVA)
2 views (last 30 days)
Show older comments
I am doing signal processing with a machine called EMA. It works by putting sensors on a participants tongue and records the X,Y,Z coordinates of those sensors over time.
I have put the data into MATLAB and I can calculate the mean of the series of tokens I have, but I cannot figure out how to put 95% confidence intervals around the mean curve that is produced. Could anyone help me?
Below is what I have for plotting the mean, if anyone can help me plot the 95% confidence intervals, I would be very grateful.
Sincerely,
Phil
% these refer to different matrices storing specific data for specific tokens.
cons = 'rr'; env = '#_a';
%these store the trial numbers of consonant, environment of interest consinds = strind(CONS, cons); envinds = strind(ENVIRONMENT, env); consenvinds = intersect(consinds, envinds);
%%%%
%%change this to consinds, envinds, consenvinds indices_of_interest = consenvinds; %%%%%
meangamma = mean(cell2mat(GAMMA(indices_of_interest)'));
hold on plot(meangamma, 'g')
0 Comments
Answers (1)
Tom Lane
on 23 Apr 2013
I'm having trouble understanding the code you wrote.
Perhaps you can figure out how to compute the mean and std for each group. The standard error of the mean, or sem, is std/sqrt(N) for N observations. A 95% confidence interval is about +/- 2*sem from the mean. You could use the errorbar function for plotting.
If you have the Statistics Toolbox, type "help grpstats" and you may find something helpful.
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!