Description Usage Arguments Details Value References Examples
This function performs an Anderson–Darling ksample test. This is used to determine if several samples (groups) share a common (unspecified) distribution.
1  ad_ksample(data = NULL, x, groups, alpha = 0.025)

data 
a data.frame 
x 
the variable in the data.frame on which to perform the Anderson–Darling kSample test (usually strength) 
groups 
a variable in the data.frame that defines the groups 
alpha 
the significance level (default 0.025) 
This function is a wrapper for the ad.test function from
the package kSamples
. The method "exact" is specified in the call to
ad.test
. Refer to that package's documentation for details.
There is a minor difference in the formulation of the Anderson–Darling kSample test in CMH171G, compared with that in the Scholz and Stephens (1987). This difference affects the test statistic and the critical value in the same proportion, and therefore the conclusion of the test is unaffected. When comparing the test statistic generated by this function to that generated by software that uses the CMH171G formulation (such as ASAP, CMH17STATS, etc.), the test statistic reported by this function will be greater by a factor of (k  1), with a corresponding change in the critical value.
For more information about the difference between this function and
the formulation in CMH171G, see the vignette on the subject, which
can be accessed by running vignette("adktest")
Returns an object of class adk
. This object has the following fields:
call
the expression used to call this function
data
the original data used to compute the ADK
groups
a vector of the groups used in the computation
alpha
the value of alpha specified
n
the total number of observations
k
the number of groups
sigma
the computed standard deviation of the test statistic
ad
the value of the Anderson–Darling kSample test statistic
p
the computed pvalue
reject_same_dist
a boolean value indicating whether the null
hypothesis that all samples come from the same distribution is rejected
raw
the original results returned from
ad.test
F. W. Scholz and M. Stephens, “KSample Anderson–Darling Tests,” Journal of the American Statistical Association, vol. 82, no. 399. pp. 918–924, Sep1987.
“Composite Materials Handbook, Volume 1. Polymer Matrix Composites Guideline for Characterization of Structural Materials,” SAE International, CMH171G, Mar. 2012.
1 2 3 4 5 6 7 8 9 10 11 12 13  library(dplyr)
carbon.fabric %>%
filter(test == "WT") %>%
filter(condition == "RTD") %>%
ad_ksample(strength, batch)
##
## Call:
## ad_ksample(data = ., x = strength, groups = batch)
##
## N = 18 k = 3
## ADK = 0.912 pvalue = 0.95989
## Conclusion: Samples come from the same distribution ( alpha = 0.025 )

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.