Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

LocationScaleT

Location-scale version of the t-distribution


Description

Probability mass function, distribution function and random generation for location-scale version of the t-distribution. Location-scale version of the t-distribution besides degrees of freedom ν, is parametrized using additional parameters μ for location and σ for scale (μ = 0 and σ = 1 for standard t-distribution).

Usage

dlst(x, df, mu = 0, sigma = 1, log = FALSE)

plst(q, df, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE)

qlst(p, df, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE)

rlst(n, df, mu = 0, sigma = 1)

Arguments

x, q

vector of quantiles.

df

degrees of freedom (> 0, maybe non-integer). df = Inf is allowed.

mu

vector of locations

sigma

vector of positive valued scale parameters.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X ≤ x] otherwise, P[X > x].

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

See Also

Examples

x <- rlst(1e5, 1000, 5, 13)
hist(x, 100, freq = FALSE)
curve(dlst(x, 1000, 5, 13), -60, 60, col = "red", add = TRUE)
hist(plst(x, 1000, 5, 13))
plot(ecdf(x))
curve(plst(x, 1000, 5, 13), -60, 60, col = "red", lwd = 2, add = TRUE)

extraDistr

Additional Univariate and Multivariate Distributions

v1.9.1
GPL-2
Authors
Tymoteusz Wolodzko
Initial release
2020-08-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.