detectnorm {detectnorm}R Documentation

Calculate skewness and kurtosis based on Beta or truncated normal distribution in a meta-analysis for SMD (Two independent groups)

Description

This function can be used to calculate the skewness and kurtosis based on the Beta distribution with the dataset used to conduct meta-analysis.

Usage

detectnorm(
  m1i,
  sd1i,
  n1i,
  lo1i,
  hi1i,
  m2i,
  sd2i,
  n2i,
  lo2i,
  hi2i,
  data,
  showFigure = FALSE,
  distri = "beta",
  ...
)

Arguments

m1i

vector to the means of first group

sd1i

vector to specifiy the standard deviation of first group

n1i

vector to specify the sample size of first group

lo1i

vector to specify the possible minimum of the first group

hi1i

vector to specify the possible maximum of the first group

m2i

vector to the means of second group

sd2i

vector to specifiy the standard deviation of second group

n2i

vector to specify the sample size of second group

lo2i

vector to specify the possible minimum of the second group

hi2i

vector to specify the possible maximum of the second group

data

the opitional original data frame containing the data for the function

showFigure

when showFigure = TRUE, it will display all the plots (within the result as a list, result$fig) with theoretical normal curve and the truncated normal curve.

distri

Beta distribution is used when using 'distri = "beta"'; Truncated normal distribution is used when using 'distri = "truncnorm"'

...

other arguments

Value

The output of the data frame adding some columns of the possible skewness and kurtosis for each groups.

References

Barr DR, Sherrill ET (1999). “Mean and variance of truncated normal distributions.” The American Statistician, 53(4), 357–361.

Johnson NL, Kotz S, Balakrishnan N (1995). “Continuous univariate distributions.” In volume 289, chapter 25 Beta Distributions. John wiley & sons.

Robert CP (1995). “Simulation of truncated normal variables.” Statistics and computing, 5(2), 121–125.

Shah SM, Jaiswal MC (1966). “Estimation of parameters of doubly truncated normal distribution from first four sample moments.” Annals of the Institute of Statistical Mathematics, 18(1), 107–111.

Smithson M, Verkuilen J (2006). “A better lemon squeezer? Maximum-likelihood regression with beta-distributed dependent variables.” Psychological methods, 11(1), 54.

Sun RW, Cheung SF (2020). “The influence of nonnormality from primary studies on the standardized mean difference in meta-analysis.” Behavior Research Methods, 52(4), 1552–1567.

Examples

#truncated normal data
data("trun_mdat")
ex <- detectnorm(m1i = m1,sd1i = sd1,n1i = n1,
hi1i = 4,lo1i = 0,m2i = m2,sd2i = sd2,n2i = n2,
hi2i = 4,lo2i=0,distri = "truncnorm", data = trun_mdat)
head(ex)
#extremely non-normal data
data("beta_mdat")
ex2 <- detectnorm(m1i = m1,sd1i = sd1,n1i = n1,
hi1i = hi1,lo1i = lo1,m2i = m2,sd2i = sd2,n2i = n2,
hi2i = hi2,lo2i=lo2,distri = "beta", data = beta_mdat)
head(ex2)
mean(ex2$skew1)#sample skewness calculated from the sample
mean(ex2$g1_skewness) #estimated using beta

[Package detectnorm version 1.0.0 Index]