Package for testing whether a given moment of the distribution of a given sample is finite or not.
For heavy-tailed distributions with tail exponent a, only moments of order < a are finite. The tail index and heavy- tailedness are is notoriously difficult to ascertain. But the finiteness of moments (including fractional moments) can be tested directly. This package does that following the test suggested by Trapani (2016).
library(stabledist) library(finity) # Generate test data rvs <- rstable(10000000, 1.9, 0.5, 1, 0, pm = 0) # Perform the test result <- finite_moment_test(rvs, 2)
Rscript -e 'setwd("finity");Rcpp::compileAttributes()' R CMD build finity R CMD INSTALL finity_0.1.1.tar.gz
In the install command,
finity_0.1.1.tar.gz should be replaced with the correct filename of the archive (in particular with the correct version number).
Rcpp::compileAttributes() can also be run from the R interpreter. The shell commands can alternatively be run from the R interpreter as
system("R CMD build finity") etc.
Rscript -e 'setwd("finity");roxygen2::roxygenize();roxygen2::roxygenize()' R CMD Rd2pdf finity
roxygen2::roxygenize() can be executed twice from the R interpreter before building the pdf with
R CMD Rd2pdf finity.
It is important to execute
roxygenize() twice since the help files for the individual functions are only created the second time.
examples directory and follow the steps for building (and installing) and building the pdf manual.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.