dTPSC {GUD} | R Documentation |
The TPSC-Student-t Distribution
Description
The TPSC-Student-t Distribution
Usage
dTPSC(x, w, theta, sigma, delta)
rTPSC(n, w, theta, sigma, delta)
Arguments
x |
vector of quantiles. |
w |
vector of weight parameters. |
theta |
vector of the location parameters. |
sigma |
vector of the scale parameters. |
delta |
the degree of freedom. |
n |
number of observations. |
Details
The TPSC-Student-t distribution has the density
where
and
Additionally, represents the density function of the standardized Student-t distribution with the degree of freedom
.
Value
dTPSC
gives the density. rTPSC
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 <- rTPSC(n = 1e5,w = 0.7,theta = -1,sigma = 3,delta = 5)
# Plot the histogram
hist(X, breaks = 100, freq = FALSE)
# The red dashed line should match the underlining histogram
points(x = seq(-70,50,length.out = 1000),
y = dTPSC(x = seq(-70,50,length.out = 1000),
w = 0.7,theta = -1,sigma = 3,delta = 5),
type = "l",
col = "red",
lwd = 3,
lty = 2)
[Package GUD version 1.0.2 Index]