Rank: 2996 based on 50 downloads (last 30 days) and 2 files submitted
photo

Marc

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Marc View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 Sep 2008 Peirce's method Applies Peirce's method for outlier rejection Author: Marc statistics, probability, outlier, rejection, peirce 29 4
22 Sep 2008 demorse Converts audio of morse code into English text. Author: Marc sound, morse, utilities, convert, morse code, audio 21 1
  • 5.0
5.0 | 1 rating
Comments and Ratings by Marc View all
Updated File Comments Rating
14 May 2013 Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data. Author: Philipp Berens

sergio - did you see the pdf with descriptions? (http://www.jstatsoft.org/v31/i10/paper)

You probably want either the ktest of the kuipertest.

01 May 2009 How fast is your graphics card? Creates a challenging 3-d benchmark for graphics processing speed measurement. Author: Michael Kleder

1.5 on Mac.

any idea how this compares to other vid benchmarking?

Comments and Ratings on Marc's Files View all
Updated File Comment by Comments Rating
15 Sep 2014 Peirce's method Applies Peirce's method for outlier rejection Author: Marc Andy

Hello group,

This code is missing a line that enables it to assume n=60 when n>60. While it may be inappropriate to make this assumption, at least the code will run to completion by adding this line. Here is the original code:
------------------------
% find row index to use in table for this sample
n_ind = [];
if n < 61 && n > 2
n_ind = find(peirce_r(:,1) == n);
else
if n >= 61
n = 60;
warning('n > 60; using r values for n==60');
end
if n < 2
error('this function does not support samples this small... please rethink what you are doing');
return;
end
end
--------------------------

add this line after the warning statement: n_ind = find(peirce_r(:,1) == n); and you end up with this:

------------------------------
% find row index to use in table for this sample
n_ind = [];
if n < 61 && n > 2
n_ind = find(peirce_r(:,1) == n);
else
if n >= 61
n = 60;
warning('n > 60; using r values for n==60');
n_ind = find(peirce_r(:,1) == n); % this line is missing from downloaded version - schauer added 140915
end
if n < 2
error('this function does not support samples this small... please rethink what you are doing');
return;
end
end
---------------------------------

which is lines 42 through 56.

andy

13 Jul 2013 Peirce's method Applies Peirce's method for outlier rejection Author: Marc Lister, Jonathan

Most tables for Peirce's R-value only go up to N = 60. It would be great if you could implement the method without the use of the table.

26 Jan 2010 Peirce's method Applies Peirce's method for outlier rejection Author: Marc Reed, David

Hi Marc,

Just thought you should know that your code fails to define n_ind if the original data is over 60.

Other than that its a great function.

30 Sep 2008 Peirce's method Applies Peirce's method for outlier rejection Author: Marc ., MarC

Here is some code that uses the fxn. Copy and paste-able.

% generate random data:

pop_mean = 20;
pop_sd = 2;

% 1) to see how method works on random samples drawn from a normal distribution, use
% this dataset
sample_data1 = pop_mean + pop_sd*randn(1, 25);

% 2) to see how method works on random data that has built-in tendency to
% include outliers, use this method
sample_data2 = pop_mean + pop_sd*randn(1, 20);
% add in 1-4 obs of potentially outlying data
funny_data1 = pop_mean + 2*pop_sd + 3*pop_sd*rand(1, 2 + round(rand(1)));
funny_data2 = pop_mean + 4*pop_sd*randn(1,4);

sample_data2 = [sample_data2 funny_data2];

% 3) Ross example data; contains 2 points which will be rejected by Peirce's
% method

Ross_data = [101.2, 90.0, 99.0, 102.0, 103.0, 100.2, 89.0, 98.1, 101.5, 102.0];

% pick which dataset should be used

%mydata = Ross_data;
mydata = sample_data2;

% shuffle data, for the fun of it
mydata = mydata(randperm(length(mydata)));

% apply peirce criterion

[cleaned_data outlier_data] = apply_peirce(mydata);

% prep data for display

% make filter -- to help with display purposes -- (might want to make this
% part of apply_peirce.m)
pass_peirce = zeros(size(mydata));
for j=1:length(cleaned_data)
pass_peirce = pass_peirce | mydata == cleaned_data(j);
end

obs_index = 1:length(mydata);

% plot data (kept == blue circles) and outliers (red x's)

figure(1);

plot(obs_index, mydata, '.k');
hold on;
plot(obs_index(pass_peirce), mydata(pass_peirce), 'ob', 'MarkerSize', 10);
plot(obs_index(~pass_peirce), mydata(~pass_peirce), 'xr', 'MarkerSize', 15);
hold off;

set(gca, 'XLim', [0 length(mydata)+1]);
set(gca, 'YLim', [min(mydata)-1 max(mydata)+1]);

xlabel('Observation Index');
ylabel('Variable of Interest');

title('Sample Data as Categorized by Peirce Criterion')
legend('datapoint', 'included', 'outlier', 'Location', 'SouthOutside')

Contact us