データの正規性を検定するとき,ks.test の引数はどのようにしたらよいのだろうか。
x <- c(2, 3, 5.1, 7, 1, 9, 3.4, 5.4, 5.9)
ks.test(x, "pnorm", mean=mean(x), sd=sd(x))
ks.test(scale(x), "pnorm")
どちらも同じ結果になる
> x <- c(2, 3, 5.1, 7, 1, 9, 3.4, 5.4, 5.9)
> ks.test(x, "pnorm", mean=mean(x), sd=sd(x))
One-sample Kolmogorov-Smirnov test
data: x
D = 0.1327, p-value = 0.9906
alternative hypothesis: two-sided
> ks.test(scale(x), "pnorm")
One-sample Kolmogorov-Smirnov test
data: scale(x)
D = 0.1327, p-value = 0.9906
alternative hypothesis: two-sided
x <- c(2, 3, 5.1, 7, 1, 9, 3.4, 5.4, 5.9)
ks.test(x, "pnorm", mean=mean(x), sd=sd(x))
ks.test(scale(x), "pnorm")
どちらも同じ結果になる
> x <- c(2, 3, 5.1, 7, 1, 9, 3.4, 5.4, 5.9)
> ks.test(x, "pnorm", mean=mean(x), sd=sd(x))
One-sample Kolmogorov-Smirnov test
data: x
D = 0.1327, p-value = 0.9906
alternative hypothesis: two-sided
> ks.test(scale(x), "pnorm")
One-sample Kolmogorov-Smirnov test
data: scale(x)
D = 0.1327, p-value = 0.9906
alternative hypothesis: two-sided
※コメント投稿者のブログIDはブログ作成者のみに通知されます