I have a non-normal distribution function which I want to calculate it's moments (mean, variance, skewness, and kurtosis).
The packages I know are e1071
and moments
which calculate the moments for a vector of discrete values. Is there a package that estimates moments for a continuous distribution function?
As an example assume I have this distribution:
tmp <- runif(100,-10,10)
PDFdata <- density(tmp , kernel = "gaussian")
PDF <- splinefun(PDFdata$x , PDFdata$y)
Now I want to calculate: