BayesLNP {bayesestdft}R Documentation

Estimating the Student's t degrees of freedom (dof) with a Log-normal Prior over the dof

Description

BayesLNP samples from the posterior distribution of the degrees of freedom (dof) with Log-normal prior endowed upon the dof, using an Elliptical Slice Sampler (ESS).

Usage

BayesLNP(y, ini.nu = 1, S = 1000, mu = 1, sigma.sq = 1)

Arguments

y

an N-dimensional vector of continuous observations supported on the real-line

ini.nu

the initial posterior sample value of the degrees of freedom (default is 1)

S

the number of posterior samples (default is 1000)

mu

mean of the Log-normal prior density (default is 1)

sigma.sq

variance of the Log-normal prior density (default is 1)

Value

A vector of posterior sample estimates

res

an S-dimensional vector with the posterior samples

References

Lee, S. Y. (2022). "The Use of a Log-Normal Prior for the Student t-Distribution", Axioms, doi:10.3390/axioms11090462

Murray, I., Prescott Adams, R., MacKay, D. J. (2010). "Elliptical slice sampling", Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics

Examples


# data from Student's t-distribution with dof = 0.1
y = rt(n = 100, df = 0.1)

# running the Elliptical Slice Sampler (ESS) with default settings
nu = BayesLNP(y)
# reporting the posterior mean estimate of the dof
mean(nu)

# application to log-return (daily index values) of United States (S&P500)
data(index_return)
# log-returns of United States
index_return_US <- dplyr::filter(index_return, Country == "United States")
y = index_return_US$log_return_rate

# running the Elliptical Slice Sampler (ESS) with default settings
nu = BayesLNP(y)
# reporting the posterior mean estimate of the dof from the log-return data of US
mean(nu)


[Package bayesestdft version 1.0.0 Index]