(Please note that this new version 06-28-2018 supports By groups. Otherwise, it is the same as before.)
JMP provides the Shapiro-Wilk test in the Distribution platform for a departure from a normal distribution. This test has been shown to be more powerful than alternative tests, including the Anderson-Darling test (1). (Note that all such tests have low power with small samples.) Still, you might have a precedent for using the A-D test for normality so this add-in implements it. The test estimates the mean and the standard deviation of the normal distribution by default. Either one of these parameters may instead be specified if known for a test against a particular normal distribution. The test results are appended to a Distribution platform.
Simply open the add-in file to register it with JMP before use. Then, open the data table with the data column to be tested and select Add-Ins > Anderson-Darling Normality Test. Select the data column and click Y, Response. Optionally, select the column with the group identifiers and click By. If the mean is known, then select the Known radio button for the Mean and enter the value in the box provided. The same is true for the standard deviation.
Click OK. An alert window will briefly appear for each sample. The p-value for the A square test statistic is computed by a Monte Carlo simulation of 100,000 samples under the null hypothesis.
The test report is seen at the bottom of the window. The A square and adjusted A square test statistics are reported. The approximate p-value for the second test statistic is computed from a set of four interpolating functions (2).
Note that a previous version (before June 5, 2014) of this test as a script computed the p-value for A square incorrectly and should not be used. Please replace that version with this add-in if you downloaded the version before the correction became available.
References
(1) Razali, Normadiah Modh, and Yap Bee Wah (2011) Power Comparisons of Shapiro-Wilk, Kolmogorov-Smirnov, Lilliefors and Anderson-Darling Tests, Journal of Statistical Modeling and Analytics, 2(1)21-33.
(2 ) R.B. D'Augostino and M.A. Stephens, Eds., 1986, Goodness-of-Fit Techniques, Marcel Dekker.
Thanks Mark! This is actually quite useful for those of us who've worked in the medical device industry where we are always running these Normality tests... We often go with the AD test statistic (and associated p-value) since it is implemented by default in Minitab (and Minitab is more commonly used accross these device companies).
Hello Mark,
We noticed that, when saving the results in the data table, JMP only scripts the distribution (leaving the AD test out).
Any ideas on how to fix it?
Thanks.
Hi @FN, I'm including the at mention to @Mark_Bailey here in case he didn't see your post. Unfortunately, we can't commit to maintaining add-ins indefinitely, but luckily the need for the AD test was identified by customers and incorporated in JMP 15. I'll suggest using that built-in Anderson Darling test under Continuous Fit > Fit Normal Distribution > Goodness of Fit. You can see that the scripted action "Fit Normal (Goodness of Fit (1))" captures both the S-W and the AD Test result in JMP.
@PatrickGiuliano, thanks for the ping. First, JMP platforms do NOT save any customizations made through scripts. They only capture changes made interactively through the red triangle menus or direct manipulation (e.g., change plot frame dimensions). Second, this add-in is no longer necessary, as @PatrickGiuliano explained.
What Mark said about saving customizations made through scripts is still essentially true, but since the release of JMP 18, I'd like to caveat that we implemented what are called Platform Presets, which are essentially a way to customize reports easily for a particular formatting configuration that you may want to customize interactively, using a combination of red triangle menu options, axis formatting, and window sizes.
The custom Platform Presents that you build/ save are accessible within the Platform Presets menu:
Where the original file for the prebuilt Presets live inside the 'Platform Presets' folder inside JMP 18's installation directory as a dot jmppresets file type, e.g. in Windows, at C:\Program Files\JMP\JMP<or JMPPRO>\18\Samples\Platform Presets:
and Custom Presets that you create and save yourself are located inside: C:\Users\<username>\AppData\Roaming\JMP\JMP\
For example, for the Normality test report I created, it looks like this inside the dot jmppresents file located in the above:
PlatformPresets(
Source_ID( "com.jmp.user" ),
Label( "My Presets" ),
Description( "Presets that you capture from reports." ),
Folder(
Label( "Distribution" ),
Platform( "Distribution" ),
Folder(
Label( "Continuous Distribution" ),
Platform( "Continuous Distribution" ),
Preset(
Label( "Normality check test" ),
JSL(
"\[Continuous Distribution(
Column( :weight ),
Quantiles( 0 ),
Horizontal Layout( 1 ),
Vertical( 0 ),
Count Axis( 1 ),
Prob Axis( 1 ),
Axes on Left( 1 ),
Quantile Box Plot( 1 ),
Set Quantile Increment( 0.25 ),
Customize Summary Statistics(
Mean( 0 ),
Std Dev( 0 ),
Std Err Mean( 0 ),
Upper Mean Confidence Interval( 0 ),
Lower Mean Confidence Interval( 0 ),
N( 0 ),
Skewness( 1 ),
Kurtosis( 1 ),
N Missing( 0 ),
N Unique( 1 ),
Autocorrelation( 1 ),
Median( 1 ),
Trimmed Mean( 1 ),
Geometric Mean( 1 ),
Median Absolute Deviation( 1 ),
Robust Mean( 1 ),
Robust Std Dev( 1 ),
Set Trimmed Mean Percent( 0.05 )
),
Process Capability( 0 ),
Normal Quantile Plot( 1 ),
Fit Normal(
Distribution Profiler(
1,
Confidence Intervals( 1 ),
Term Value( :weight( 118, N Levels( 200 ), Lock( 0 ), Show( 1 ) ) )
),
Goodness of Fit( 1 )
),
SendToReport(
Dispatch( {}, "Distrib Quantile Plot", FrameBox, {Frame Size( 277, 266 )} ),
Dispatch( {}, "Compare Distributions", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Summary Statistics", OutlineBox,
{Close( 1 ), OutlineCloseOrientation( "Vertical" )}
),
Dispatch( {"Fitted Normal Distribution", "Distribution Profiler"},
"FitDistributionOptions", FrameBox,
{Frame Size( 277, 251 )}
),
Dispatch( {"Fitted Normal Distribution", "Goodness-of-Fit Test"}, "",
TableBox,
{Visibility( "Collapse" )}
),
Dispatch( {"Fitted Normal Distribution", "Goodness-of-Fit Test"}, "",
StringColBox,
{Visibility( "Collapse" )}
),
Dispatch( {"Fitted Normal Distribution", "Goodness-of-Fit Test"}, "W",
NumberColBox,
{Visibility( "Hidden" )}
),
Dispatch( {"Fitted Normal Distribution", "Goodness-of-Fit Test"}, "Prob<W",
NumberColBox,
{Visibility( "Hidden" )}
)
)
)]\"
)
)
)
)
)
with an additional pointer inside C:\Users\<username>\AppData\Roaming\JMP\JMP\18 existing as a dot txt document:
find("Normality check test","test","Normality","Normality check","Normality Check","FilledCircle","X__4","X__3","X__14","X__15",
"X__1","","","","","","","","","",
""),
replace("Circle","","","","","","","","","",
"","","","","","","","","","",
""),