dDTP {GUD} | R Documentation |
The DTP-Student-t Distribution
Description
The DTP-Student-t Distribution
Usage
dDTP(x, theta, sigma1, sigma2, delta1, delta2)
rDTP(n, theta, sigma1, sigma2, delta1, delta2)
Arguments
x |
vector of quantiles. |
theta |
vector of the location parameters. |
sigma1 |
vector of the scale parameters of the left skewed part. |
sigma2 |
vector of the scale parameters of the right skewed part. |
delta1 |
the degree of freedom of the left skewed part. |
delta2 |
the degree of freedom of the right skewed part. |
n |
number of observations. |
Details
The DTP-Student-t distribution has the density
where
represents
and
Additionally, represents the density function of the standardized Student-t distribution with the degree of freedom
.
Value
dDTP
gives the density. rDTP
generates random deviates.
References
Liu Q, Huang X, Bai R (2024). “Bayesian Modal Regression Based on Mixture Distributions.” Computational Statistics & Data Analysis, 108012. doi:10.1016/j.csda.2024.108012.
Examples
set.seed(100)
require(graphics)
# Random Number Generation
X <- rDTP(n = 1e5,theta = 5,sigma1 = 7,sigma2 = 3,delta1 = 5,delta2 = 6)
# Plot the histogram
hist(X, breaks = 100, freq = FALSE)
# The red dashed line should match the underlining histogram
points(x = seq(-100,40,length.out = 1000),
y = dDTP(x = seq(-100,40,length.out = 1000),
theta = 5,sigma1 = 7,sigma2 = 3,delta1 = 5,delta2 = 6),
type = "l",
col = "red",
lwd = 3,
lty = 2)
[Package GUD version 1.0.2 Index]