BayesLNP | R Documentation |
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).
BayesLNP(y, ini.nu = 1, S = 1000, mu = 1, sigma.sq = 1)
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) |
A vector of posterior sample estimates
res |
an S-dimensional vector with the posterior samples |
Lee, S. Y. (2022). "The Use of a Log-Normal Prior for the Student t-Distribution", Axioms, \Sexpr[results=rd]{tools:::Rd_expr_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
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.