Hi JMP Community,
First, thanks to @jthi for a quick and efficient solution.
Just for completeness, I used a crude alternative option where I created a function out of the core elements of the FDR JSL script (see below). I then called this function in my script.
IMPORTANTLY: the core code used in this function was created by John Sall.
NamesDefaultToHere(1);
fdr = Function ({dtf, pvalCol},
pvalues = pvalCol<<Get Values;
if (min(pvalues)<0 | max(pvalues)>1,dialog("PValues must be between 0 and 1");throw());
index = rankIndex(pvalues); // removes missing values
n = nrow(index);
ordPValue = pvalues[index];
adjPValue = J(n,1,.);
for(i=1,i<=n,i++,
j = n-i+1;
ratio = n/(n-i+1);
adjPValue[j] = if (i==1,ordPValue[j],min(ratio*ordPValue[j],adjPValue[j+1]));
);
rowPValues = J(NRow(dtf),1,.);
rowPValues[index] = adjPValue;
sfx = pvalCol << get name ();
n_col_name = "FDR " || sfx;
dtf<<NewColumn(n_col_name,Numeric,Values(rowPValues));
);
Best ,
TS
Thierry R. Sornasse