bayesestdft: An R package for Bayesian estimation of the number of degrees of the freedom of the Student's t-distribution
An R package bayesestdft
includes tools to implement Bayesian estimation of the number of degrees of the freedom of the Student's t-distribution, developed by Dr. Se Yoon Lee ([email protected]). The package was developed to analyze simulated and real data from the published article "The Use of a Log-Normal Prior for the Student t-Distribution" Axioms 2022, 11, 462". Readers can see the paper for technical details about the package. At current version, the main functions are BayesLNP
, BayesJeffreys
, and BayesGA
that implement Markov Chain Monte Carlo algorithms to sample from the posterior distribution of the degrees of freedom. To operatre the function BayesJeffreys
, user needs to install R library(numDeriv)
. See the Slides that summarized the technical parts of the R package.
R version 4.0.4 (or higher)
library(devtools)
devtools::install_github("yain22/bayesestdft")
library(bayesestdft)
The goal of R Package bayesestdft
is the fully Bayesian estimation of the number of degrees of the freedom of the Student's t-distribution. More precisely, provided the
and a prior distribution
The current version of the package provides four options of the priors
x = rt(n = 100, df = 0.1)
nu1 = BayesJeffreys(x, sampling.alg = "MH")
nu2 = BayesJeffreys(x, sampling.alg = "MALA")
mean(nu1)
mean(nu2)
library(dplyr)
data(index_return)
index_return_US <- filter(index_return, Country == "United States")
x = index_return_US$log_return_rate
nu1 = BayesJeffreys(x, sampling.alg = "MH")
nu2 = BayesJeffreys(x, sampling.alg = "MALA")
mean(nu1)
mean(nu2)
x = rt(n = 100, df = 0.1)
nu = BayesGA(x, a = 1, b = 0.1)
mean(nu)
library(dplyr)
data(index_return)
index_return_US <- filter(index_return, Country == "United States")
x = index_return_US$log_return_rate
nu = BayesGA(x, a = 1, b = 0.1)
mean(nu)
x = rt(n = 100, df = 0.1)
nu = BayesGA(x, a = 2, b = 0.1)
mean(nu)
library(dplyr)
data(index_return)
index_return_US <- filter(index_return, Country == "United States")
x = index_return_US$log_return_rate
nu = BayesGA(x, a = 2, b = 0.1)
mean(nu)
x = rt(n = 100, df = 0.1)
nu = BayesLNP(x)
mean(nu)
library(dplyr)
data(index_return)
index_return_US <- filter(index_return, Country == "United States")
x = index_return_US$log_return_rate
nu = BayesLNP(x)
mean(nu)
[1] Se Yoon Lee. (2022) “The Use of a Log-Normal Prior for the Student t-Distribution,” Axioms