One-sample Kolmogorov-Smirnov test for student-t distribution
One-sample Kolmogorov-Smirnov test for student-t distribution
Performs a two-sided KS test for H0:X∼tν with c, scale s, and degrees of freedom ν. If parameters are not specified, the MLE given the data will be used (see fitdistr).
For estimated parameters of the t-distribution the p-values are incorrect and should be adjusted. See ks.test and the references therein (Durbin (1973)). As a more practical approach consider bootstrapping and estimating the p-value empirically.
ks_test_t(x, param =NULL)
Arguments
x: a numeric vector of data values.
param: 3-dimensional named vector ('location', 'scale', 'df')
which parametrizes the student t distribution. Default: param = NULL, in which case it will be estimated from x.
Returns
A list of class "htest" containing: - statistic: the value of the Kolomogorv-Smirnov statistic.
p.value: the p-value for the test.
alternative: a character string describing the alternative hypothesis.
method: the character string "One-sample Kolmogorov-Smirnov test student-t" plus rounded parameter values.
data.name: a character string giving the name(s) of the data.