# Non-parametric error/confidence intervals (Scripts) 1.0

Average Rating
User Rating:
Visitors Rating:
My rating:

See full specifications

## Non-parametric error/confidence intervals (Scripts) Publisher's description

### function Err = DataSeriesNonParamErr(Dat,Type,alpha)

The entire function is as follows:

function Err = DataSeriesNonParamErr(Dat,Type,alpha)
%function Err = DataSeriesNonParamErr(Dat,Type,'alpha)
%
% Calculate non-parametric error bars at every point in the input array
% Dat, based on Type. If Type is 0, the program will calculate the standard
% error of the mean. If Type is 1 it will calculate (conservative)
% confidence intervals based on the VysochanskijвЂ“Petunin inequality using
% the standard error of the mean, or if Type is 2 it will use the Chebyshev
% inequality to produce even more conservative confidnece intervals.
%
% Inputs: Dat- Input data series (nSamp x nTimePoints). An error
% estimate is given for each time point. NaNs in the input.
% Type- What type of an error estimate to use. Options are 0
% (default) for the standard error of the mean, 1 for
% VysochanskijвЂ“Petunin confidence intervals, or 2 for
% Chebyshev confidence intervals.
% alpha- The alpha level used for the confidence intervals. This
% value is ignored if plotting the standard error of the
% mean.
%
% Outputs: CHi- A 2 x nTimePoints array of error estimates, where the
% first row stores the High error estimate, and the
% second row stored the Low error estimate.
%
% According to: http://en.wikipedia.org/wiki/Vysochanski%C3%AF-Petunin_inequality
% the VysochanskijвЂ“Petunin inequality is like the Chebyshev inequality, but
% can be slightly less conservative because of an assumption that the
% underlying distribution is unimodal.
%
% 100322 by Matthew Nelson
% nelsonmj@caltech.edu

if nargin<3 || isempty(alpha); alpha = 0.05; end
if nargin<2 || isempty(Type); Type = 0; end

switch Type
case 0
lam=1;
case 1 %VysochanskijвЂ“Petunin
lam=sqrt(4/(9*alpha));
case 2 %Chebyshev
lam=sqrt(1/alpha);
end

sem= nanstd(Dat,1) ./ sqrt( sum(~isnan(Dat),1) ) * lam;
tmpmn=nanmean(Dat,1);

Err=[tmpmn + sem; tmpmn-sem];

#### System Requirements:

MATLAB 7.9 (2009b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

#### Non-parametric error/confidence intervals (Scripts) Tags:

Click on a tag to find related softwares

## Most Popular

ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation