Movatterモバイル変換


[0]ホーム

URL:


PSGoft:Modified Lilliefors Goodness-of-Fit Normality Test

author: Piotr Sulewski, Pomeranian University

The goal of the PSGoft package is to put into practice the (a,b)modified Lilliefors goodness-of-fit normality test. This modificationconsists in varying a formula of calculating the empirical distributionfunction. Values of constants a, b in the formula depend on values ofsample skewness and excess kurtosis, which is recommended in order toincrease the power of the LF test. To read more about the package pleasesee (and cite :)) papers:

Sulewski P. (2019) Modified Lilliefors Goodness-of-fit Test forNormality, Communications in Statistics - Simulation and Computation,51(3), 1199-1219

Installation

You can install the released version ofPSGoft fromCRAN with:

install.packages("PSGoft")

You can install the development version ofPSGoftfromGitHub with:

library("remotes")remotes::install_github("PiotrSule/PSGoft")

This package includes two real data sets

The first one,data1, consist of 72 observations forDozer Cycle Times.

The second one,data2, is the height of 99five-year-old British boys in cm

library(PSGoft)length(data1)#> [1] 72head(data2)#> [1] 96.1 97.1 97.1 97.2 99.2 99.4

Functions

MLF.stat

This function returns the value of the Modified Lillieforsgoodness-of-fit statistic

MLF.stat(data1)#> [1] 0.05488005MLF.stat(rnorm(33,mean =0,sd =2))#> [1] 0.09910243

MLF.pvalue

This function returns the p-value for the test

MLF.pvalue(data1)#> [1] 0.81592MLF.pvalue(rnorm(33,mean =0,sd =2))#> [1] 0.66459

MLF.stat

This function returns the value of the Modified Lilliefors statisticand the p-value for the test.

MLF.test(data1)#>#>  Modified Lilliefors goodness-of-fit normality test#>#> data:  data1#> D = 0.05488, p-value = 0.816MLF.test(rnorm(33,mean =0,sd =2))#>#>  Modified Lilliefors goodness-of-fit normality test#>#> data:  rnorm(33, mean = 0, sd = 2)#> D = 0.083871, p-value = 0.748

[8]ページ先頭

©2009-2025 Movatter.jp