| Title: | Some Distributions from the 'Boost' Library and More |
|---|---|
| Description: | Make some distributions from the 'C++' library 'Boost' available in 'R'. In addition, the normal-inverse Gaussian distribution and the generalized inverse Gaussian distribution are provided. The distributions are represented by 'R6' classes. The method to sample from the generalized inverse Gaussian distribution is the one given in "Random variate generation for the generalized inverse Gaussian distribution" Luc Devroye (2012) <doi:10.1007/s11222-012-9367-z>. |
| Authors: | Stéphane Laurent [aut, cre] |
| Maintainer: | Stéphane Laurent <[email protected]> |
| License: | GPL-3 |
| Version: | 1.0.0.9000 |
| Built: | 2026-05-10 08:35:56 UTC |
| Source: | https://github.com/stla/boodist |
A R6 class to represent a non-central beta distribution.
aGet or set the value of a.
bGet or set the value of b.
deltaGet or set the value of delta.
new()
New beta distribution.
Beta$new(a, b, delta)
a, bshape parameters, > 0
deltanon-centrality parameter, >= 0
A Beta object.
d()
Density function of the beta distribution.
Beta$d(x)
xnumeric vector
The density evaluated at x.
p()
Cumulative distribution function of the beta distribution.
Beta$p(q, lower = TRUE)
qnumeric vector of quantiles
lowerBoolean, whether to deal with the lower tail
The cumulative probabilities corresponding to q.
q()
Quantile function of the beta distribution.
Beta$q(p, lower = TRUE)
pnumeric vector of probabilities
lowerBoolean, whether to deal with the lower tail
The quantiles corresponding to p.
r()
Sampling from the beta distribution.
Beta$r(n)
nnumber of simulations
A numeric vector of length n.
mean()
Mean of the beta distribution.
Beta$mean()
The mean of the beta distribution.
median()
Median of the beta distribution.
Beta$median()
The median of the beta distribution.
mode()
Mode of the beta distribution.
Beta$mode()
The mode of the beta distribution.
sd()
Standard deviation of the beta distribution.
Beta$sd()
The standard deviation of the beta distribution.
variance()
Variance of the beta distribution.
Beta$variance()
The variance of the beta distribution.
skewness()
Skewness of the beta distribution.
Beta$skewness()
The skewness of the beta distribution.
kurtosis()
Kurtosis of the beta distribution.
Beta$kurtosis()
The kurtosis of the beta distribution.
kurtosisExcess()
Kurtosis excess of the beta distribution.
Beta$kurtosisExcess()
The kurtosis excess of the beta distribution.
clone()
The objects of this class are cloneable with this method.
Beta$clone(deep = FALSE)
deepWhether to make a deep clone.
Find the degrees of freedom parameter of a non-central Chi-squared distribution given a quantile, its corresponding probability, and the non-centrality parameter.
findChi2df(ncp, q, p)findChi2df(ncp, q, p)
ncp |
non-centrality parameter, a non-negative number |
q |
a quantile |
p |
probability corresponding to the quantile |
The degrees of freedom parameter of the non-central Chi-squared
distribution with non-centrality parameter ncp and with
cumulative probability p at the quantile q.
library(boodist) nu <- findChi2df(ncp = 10, q = 3, p = 0.1) pchisq(3, df = nu, ncp = 10) # should be 0.1library(boodist) nu <- findChi2df(ncp = 10, q = 3, p = 0.1) pchisq(3, df = nu, ncp = 10) # should be 0.1
Find the non-centrality parameter of a Chi-squared distribution given a quantile, its corresponding probability, and the degrees of freedom.
findChi2ncp(df, q, p)findChi2ncp(df, q, p)
df |
degrees of freedom, a positive number |
q |
a quantile |
p |
probability corresponding to the quantile |
The non-centrality parameter of the Chi-squared distribution with
degrees of freedom parameter df and with cumulative probability
p at the quantile q.
library(boodist) ncp <- findChi2ncp(df = 1, q = 3, p = 0.1) pchisq(3, df = 1, ncp = ncp) # should be 0.1library(boodist) ncp <- findChi2ncp(df = 1, q = 3, p = 0.1) pchisq(3, df = 1, ncp = ncp) # should be 0.1
A R6 class to represent a generalized inverse Gaussian distribution.
See Wikipedia.
thetaGet or set the value of theta.
etaGet or set the value of eta.
lambdaGet or set the value of lambda.
new()
New generalized inverse Gaussian distribution.
GeneralizedInverseGaussian$new(theta, eta, lambda)
thetaconcentration parameter, >0
etascale parameter, >0
lambdaparameter (denoted by p on Wikipedia)
A GeneralizedInverseGaussian object.
d()
Density function of the generalized inverse Gaussian distribution.
GeneralizedInverseGaussian$d(x, log = FALSE)
xvector of positive numbers
logBoolean, whether to return the log-density
The density or the log-density evaluated at x.
p()
Cumulative distribution function of the generalized inverse Gaussian distribution.
GeneralizedInverseGaussian$p(q)
qnumeric vector of quantiles (>= 0)
The cumulative probabilities corresponding to q, with two
attributes (see the Note).
q()
Quantile function of the generalized inverse Gaussian distribution.
GeneralizedInverseGaussian$q(p, bounds = NULL)
pnumeric vector of probabilities
boundsbounds enclosing the quantiles to be found (see the
Note), or NULL for automatic bounds
The quantiles corresponding to p.
r()
Sampling from the generalized inverse Gaussian distribution.
GeneralizedInverseGaussian$r(n)
nnumber of simulations
A numeric vector of length n.
mean()
Mean of the generalized inverse Gaussian distribution.
GeneralizedInverseGaussian$mean()
The mean of the generalized inverse Gaussian distribution.
mode()
Mode of the generalized inverse Gaussian distribution.
GeneralizedInverseGaussian$mode()
The mode of the generalized inverse Gaussian distribution.
sd()
Standard deviation of the generalized inverse Gaussian distribution.
GeneralizedInverseGaussian$sd()
The standard deviation of the generalized inverse Gaussian distribution.
variance()
Variance of the generalized inverse Gaussian distribution.
GeneralizedInverseGaussian$variance()
The variance of the generalized inverse Gaussian distribution.
clone()
The objects of this class are cloneable with this method.
GeneralizedInverseGaussian$clone(deep = FALSE)
deepWhether to make a deep clone.
The cumulative distribution function is evaluated by integrating the
density function (in C++). Its returned value has two attributes: a
numeric vector "error_estimate" and an integer vector
"error_code". The error code is 0 if no problem is detected. If an
error code is not 0, a warning is thrown. The quantile function is
evaluated by root-finding and then the user must provide some bounds
enclosing the values of the quantiles or choose the automatic bounds.
A maximum number of iterations is fixed in the root-finding algorithm.
If it is reached, a warning is thrown.
if(require("plotly")) { library(boodist) x_ <- seq(0, 3, length.out = 100L) lambda_ <- seq(-1, 1, length.out = 100L) dsty <- vapply(lambda_, function(lambda) { GeneralizedInverseGaussian$new(theta = 1, eta = 1, lambda)$d(x_) }, numeric(length(x_))) # txt <- matrix(NA_character_, nrow = length(x_), ncol = length(lambda_)) for(i in 1L:nrow(txt)) { for(j in 1L:ncol(txt)) { txt[i, j] <- paste0( "x: ", formatC(x_[i]), "<br> lambda: ", formatC(lambda_[j]), "<br> density: ", formatC(dsty[i, j]) ) } } # plot_ly( x = ~lambda_, y = ~x_, z = ~dsty, type = "surface", text = txt, hoverinfo = "text", showscale = FALSE ) %>% layout( title = "Generalized inverse Gaussian distribution", margin = list(t = 40, r= 5, b = 5, l = 5), scene = list( xaxis = list( title = "lambda" ), yaxis = list( title = "x" ), zaxis = list( title = "density" ) ) ) }if(require("plotly")) { library(boodist) x_ <- seq(0, 3, length.out = 100L) lambda_ <- seq(-1, 1, length.out = 100L) dsty <- vapply(lambda_, function(lambda) { GeneralizedInverseGaussian$new(theta = 1, eta = 1, lambda)$d(x_) }, numeric(length(x_))) # txt <- matrix(NA_character_, nrow = length(x_), ncol = length(lambda_)) for(i in 1L:nrow(txt)) { for(j in 1L:ncol(txt)) { txt[i, j] <- paste0( "x: ", formatC(x_[i]), "<br> lambda: ", formatC(lambda_[j]), "<br> density: ", formatC(dsty[i, j]) ) } } # plot_ly( x = ~lambda_, y = ~x_, z = ~dsty, type = "surface", text = txt, hoverinfo = "text", showscale = FALSE ) %>% layout( title = "Generalized inverse Gaussian distribution", margin = list(t = 40, r= 5, b = 5, l = 5), scene = list( xaxis = list( title = "lambda" ), yaxis = list( title = "x" ), zaxis = list( title = "density" ) ) ) }
A R6 class to represent a Gumbel distribution.
See Wikipedia.
aGet or set the value of a.
bGet or set the value of b.
new()
New Gumbel distribution.
Gumbel$new(a, b)
alocation parameter
bscale parameter, >0
A Gumbel object.
d()
Density function of the Gumbel distribution.
Gumbel$d(x, log = FALSE)
xnumeric vector
logBoolean, whether to return the logarithm of the density
The density or the log-density evaluated at x.
p()
Cumulative distribution function of the Gumbel distribution.
Gumbel$p(q, lower = TRUE)
qnumeric vector of quantiles
lowerBoolean, whether to deal with the lower tail
The cumulative probabilities corresponding to q.
q()
Quantile function of the Gumbel distribution.
Gumbel$q(p, lower = TRUE)
pnumeric vector of probabilities
lowerBoolean, whether to deal with the lower tail
The quantiles corresponding to p.
r()
Sampling from the Gumbel distribution.
Gumbel$r(n)
nnumber of simulations
A numeric vector of length n.
mean()
Mean of the Gumbel distribution.
Gumbel$mean()
The mean of the Gumbel distribution.
median()
Median of the Gumbel distribution.
Gumbel$median()
The median of the Gumbel distribution.
mode()
Mode of the Gumbel distribution.
Gumbel$mode()
The mode of the Gumbel distribution.
sd()
Standard deviation of the Gumbel distribution.
Gumbel$sd()
The standard deviation of the Gumbel distribution.
variance()
Variance of the Gumbel distribution.
Gumbel$variance()
The variance of the Gumbel distribution.
skewness()
Skewness of the Gumbel distribution.
Gumbel$skewness()
The skewness of the Gumbel distribution.
kurtosis()
Kurtosis of the Gumbel distribution.
Gumbel$kurtosis()
The kurtosis of the Gumbel distribution.
kurtosisExcess()
Kurtosis excess of the Gumbel distribution.
Gumbel$kurtosisExcess()
The kurtosis excess of the Gumbel distribution.
clone()
The objects of this class are cloneable with this method.
Gumbel$clone(deep = FALSE)
deepWhether to make a deep clone.
A R6 class to represent a hyperexponential distribution.
See Wikipedia.
probsGet or set the value of probs.
ratesGet or set the value of rates.
new()
New hyperexponential distribution.
Hyperexponential$new(probs, rates)
probsprobabilities (weights), a vector of positive numbers
ratesrate parameters, vector of positive numbers of the same
length as the probs vector
A Hyperexponential object.
d()
Density function of the hyperexponential distribution.
Hyperexponential$d(x)
xvector of positive numbers
The density evaluated at x.
p()
Cumulative distribution function of the hyperexponential distribution.
Hyperexponential$p(q, lower = TRUE)
qnumeric vector of quantiles
lowerBoolean, whether to deal with the lower tail
The cumulative probabilities corresponding to q.
q()
Quantile function of the hyperexponential distribution.
Hyperexponential$q(p, lower = TRUE)
pnumeric vector of probabilities
lowerBoolean, whether to deal with the lower tail
The quantiles corresponding to p.
r()
Sampling from the hyperexponential distribution.
Hyperexponential$r(n)
nnumber of simulations
A numeric vector of length n.
mean()
Mean of the hyperexponential distribution.
Hyperexponential$mean()
The mean of the hyperexponential distribution.
mode()
Mode of the hyperexponential distribution.
Hyperexponential$mode()
The mode of the hyperexponential distribution.
sd()
Standard deviation of the hyperexponential distribution.
Hyperexponential$sd()
The standard deviation of the hyperexponential distribution.
variance()
Variance of the hyperexponential distribution.
Hyperexponential$variance()
The variance of the hyperexponential distribution.
skewness()
Skewness of the hyperexponential distribution.
Hyperexponential$skewness()
The skewness of the hyperexponential distribution.
kurtosis()
Kurtosis of the hyperexponential distribution.
Hyperexponential$kurtosis()
The kurtosis of the hyperexponential distribution.
kurtosisExcess()
Kurtosis excess of the hyperexponential distribution.
Hyperexponential$kurtosisExcess()
The kurtosis excess of the hyperexponential distribution.
clone()
The objects of this class are cloneable with this method.
Hyperexponential$clone(deep = FALSE)
deepWhether to make a deep clone.
A R6 class to represent an inverse Gamma distribution.
See Wikipedia.
alphaGet or set the value of alpha.
betaGet or set the value of beta.
new()
New inverse Gamma distribution.
InverseGamma$new(alpha, beta)
alphashape parameter, >0
betascale parameter, >0
An inverseGamma object.
d()
Density function of the inverse Gamma distribution.
InverseGamma$d(x, log = FALSE)
xvector of positive numbers
logBoolean, whether to return the logarithm of the density
The density or the log-density evaluated at x.
p()
Cumulative distribution function of the inverse Gamma distribution.
InverseGamma$p(q, lower = TRUE)
qnumeric vector of quantiles
lowerBoolean, whether to deal with the lower tail
The cumulative probabilities corresponding to q.
q()
Quantile function of the inverse Gamma distribution.
InverseGamma$q(p, lower = TRUE)
pnumeric vector of probabilities
lowerBoolean, whether to deal with the lower tail
The quantiles corresponding to p.
r()
Sampling from the inverse Gamma distribution.
InverseGamma$r(n)
nnumber of simulations
A numeric vector of length n.
mean()
Mean of the inverse Gamma distribution.
InverseGamma$mean()
The mean of the inverse Gamma distribution.
median()
Median of the inverse Gamma distribution.
InverseGamma$median()
The median of the inverse Gamma distribution.
mode()
Mode of the inverse Gamma distribution.
InverseGamma$mode()
The mode of the inverse Gamma distribution.
sd()
Standard deviation of the inverse Gamma distribution.
InverseGamma$sd()
The standard deviation of the inverse Gamma distribution.
variance()
Variance of the inverse Gamma distribution.
InverseGamma$variance()
The variance of the inverse Gamma distribution.
skewness()
Skewness of the inverse Gamma distribution.
InverseGamma$skewness()
The skewness of the inverse Gamma distribution.
kurtosis()
Kurtosis of the inverse Gamma distribution.
InverseGamma$kurtosis()
The kurtosis of the inverse Gamma distribution.
kurtosisExcess()
Kurtosis excess of the inverse Gamma distribution.
InverseGamma$kurtosisExcess()
The kurtosis excess of the inverse Gamma distribution.
clone()
The objects of this class are cloneable with this method.
InverseGamma$clone(deep = FALSE)
deepWhether to make a deep clone.
if(require("plotly")) { x_ <- seq(0, 2, length.out = 100L) alpha_ <- seq(0.5, 2.5, length.out = 100L) dsty <- vapply(alpha_, function(alpha) { InverseGamma$new(alpha, beta = 1)$d(x_) }, numeric(length(x_))) # txt <- matrix(NA_character_, nrow = length(x_), ncol = length(alpha_)) for(i in 1L:nrow(txt)) { for(j in 1L:ncol(txt)) { txt[i, j] <- paste0( "x: ", formatC(x_[i]), "<br> alpha: ", formatC(alpha_[j]), "<br> density: ", formatC(dsty[i, j]) ) } } # plot_ly( x = ~alpha_, y = ~x_, z = ~dsty, type = "surface", text = txt, hoverinfo = "text", showscale = FALSE ) %>% layout( title = "Inverse Gamma distribution", margin = list(t = 40, r= 5, b = 5, l = 5), scene = list( xaxis = list( title = "alpha" ), yaxis = list( title = "x" ), zaxis = list( title = "density" ) ) ) }if(require("plotly")) { x_ <- seq(0, 2, length.out = 100L) alpha_ <- seq(0.5, 2.5, length.out = 100L) dsty <- vapply(alpha_, function(alpha) { InverseGamma$new(alpha, beta = 1)$d(x_) }, numeric(length(x_))) # txt <- matrix(NA_character_, nrow = length(x_), ncol = length(alpha_)) for(i in 1L:nrow(txt)) { for(j in 1L:ncol(txt)) { txt[i, j] <- paste0( "x: ", formatC(x_[i]), "<br> alpha: ", formatC(alpha_[j]), "<br> density: ", formatC(dsty[i, j]) ) } } # plot_ly( x = ~alpha_, y = ~x_, z = ~dsty, type = "surface", text = txt, hoverinfo = "text", showscale = FALSE ) %>% layout( title = "Inverse Gamma distribution", margin = list(t = 40, r= 5, b = 5, l = 5), scene = list( xaxis = list( title = "alpha" ), yaxis = list( title = "x" ), zaxis = list( title = "density" ) ) ) }
A R6 class to represent an inverse Gaussian distribution.
See Wikipedia.
muGet or set the value of mu.
lambdaGet or set the value of lambda.
new()
New inverse Gaussian distribution.
InverseGaussian$new(mu, lambda)
muparameter, the mean, >0
lambdashape parameter, >0
An inverseGaussian object.
d()
Density function of the inverse Gaussian distribution.
InverseGaussian$d(x, log = FALSE)
xvector of positive numbers
logBoolean, whether to return the logarithm of the density
The density or the log-density evaluated at x.
p()
Cumulative distribution function of the inverse Gaussian distribution.
InverseGaussian$p(q, lower = TRUE)
qnumeric vector of quantiles
lowerBoolean, whether to deal with the lower tail
The cumulative probabilities corresponding to q.
q()
Quantile function of the inverse Gaussian distribution.
InverseGaussian$q(p, lower = TRUE)
pnumeric vector of probabilities
lowerBoolean, whether to deal with the lower tail
The quantiles corresponding to p.
r()
Sampling from the inverse Gaussian distribution.
InverseGaussian$r(n)
nnumber of simulations
A numeric vector of length n.
mean()
Mean of the inverse Gaussian distribution.
InverseGaussian$mean()
The mean of the inverse Gaussian distribution.
median()
Median of the inverse Gaussian distribution.
InverseGaussian$median()
The median of the inverse Gaussian distribution.
mode()
Mode of the inverse Gaussian distribution.
InverseGaussian$mode()
The mode of the inverse Gaussian distribution.
sd()
Standard deviation of the inverse Gaussian distribution.
InverseGaussian$sd()
The standard deviation of the inverse Gaussian distribution.
variance()
Variance of the inverse Gaussian distribution.
InverseGaussian$variance()
The variance of the inverse Gaussian distribution.
skewness()
Skewness of the inverse Gaussian distribution.
InverseGaussian$skewness()
The skewness of the inverse Gaussian distribution.
kurtosis()
Kurtosis of the inverse Gaussian distribution.
InverseGaussian$kurtosis()
The kurtosis of the inverse Gaussian distribution.
kurtosisExcess()
Kurtosis excess of the inverse Gaussian distribution.
InverseGaussian$kurtosisExcess()
The kurtosis excess of the inverse Gaussian distribution.
clone()
The objects of this class are cloneable with this method.
InverseGaussian$clone(deep = FALSE)
deepWhether to make a deep clone.
A R6 class to represent a normal-inverse Gaussian distribution.
See Wikipedia.
muGet or set the value of mu.
alphaGet or set the value of alpha.
betaGet or set the value of beta.
deltaGet or set the value of delta.
new()
New normal-inverse Gaussian distribution.
NormalInverseGaussian$new(mu, alpha, beta, delta)
mulocation parameter
alphatail heaviness parameter, >0
betaasymmetry parameter
deltascale parameter, >0
A NormalInverseGaussian object.
d()
Density function of the normal-inverse Gaussian distribution.
NormalInverseGaussian$d(x, log = FALSE)
xnumeric vector
logBoolean, whether to return the logarithm of the density
The density or the log-density evaluated at x.
p()
Cumulative distribution function of the normal-inverse Gaussian distribution.
NormalInverseGaussian$p(q)
qnumeric vector of quantiles
The cumulative probabilities corresponding to q, with two
attributes (see the Note).
q()
Quantile function of the normal-inverse Gaussian distribution.
NormalInverseGaussian$q(p, bounds = NULL)
pnumeric vector of probabilities
boundsbounds enclosing the quantiles to be found (see the
Note), or NULL for automatic bounds
The quantiles corresponding to p.
r()
Sampling from the normal-inverse Gaussian distribution.
NormalInverseGaussian$r(n)
nnumber of simulations
A numeric vector of length n.
mean()
Mean of the normal-inverse Gaussian distribution.
NormalInverseGaussian$mean()
The mean of the normal-inverse Gaussian distribution.
sd()
Standard deviation of the normal-inverse Gaussian distribution.
NormalInverseGaussian$sd()
The standard deviation of the normal-inverse Gaussian distribution.
variance()
Variance of the normal-inverse Gaussian distribution.
NormalInverseGaussian$variance()
The variance of the normal-inverse Gaussian distribution.
skewness()
Skewness of the normal-inverse Gaussian distribution.
NormalInverseGaussian$skewness()
The skewness of the normal-inverse Gaussian distribution.
kurtosis()
Kurtosis of the normal-inverse Gaussian distribution.
NormalInverseGaussian$kurtosis()
The kurtosis of the normal-inverse Gaussian distribution.
kurtosisExcess()
Kurtosis excess of the normal-inverse Gaussian distribution.
NormalInverseGaussian$kurtosisExcess()
The kurtosis excess of the normal-inverse Gaussian distribution.
clone()
The objects of this class are cloneable with this method.
NormalInverseGaussian$clone(deep = FALSE)
deepWhether to make a deep clone.
The cumulative distribution function is evaluated by integrating the
density function (in C++). Its returned value has two attributes: a
numeric vector "error_estimate" and an integer vector
"error_code". The error code is 0 if no problem is detected. If an
error code is not 0, a warning is thrown. The quantile function is
evaluated by root-finding and then the user must provide some bounds
enclosing the values of the quantiles or choose the automatic bounds.
A maximum number of iterations is fixed in the root-finding algorithm.
If it is reached, a warning is thrown.
A R6 class to represent a skew normal distribution.
See Wikipedia.
xiGet or set the value of xi.
omegaGet or set the value of omega.
alphaGet or set the value of alpha.
new()
New skew normal distribution.
SkewNormal$new(xi, omega, alpha)
xilocation parameter
omegascale parameter, >0
alphashape parameter
A SkewNormal object.
d()
Density function of the skew normal distribution.
SkewNormal$d(x)
xnumeric vector
The density evaluated at x.
p()
Cumulative distribution function of the skew normal distribution.
SkewNormal$p(q, lower = TRUE)
qnumeric vector of quantiles
lowerBoolean, whether to deal with the lower tail
The cumulative probabilities corresponding to q.
q()
Quantile function of the skew normal distribution.
SkewNormal$q(p, lower = TRUE)
pnumeric vector of probabilities
lowerBoolean, whether to deal with the lower tail
The quantiles corresponding to p.
r()
Sampling from the skew normal distribution.
SkewNormal$r(n)
nnumber of simulations
A numeric vector of length n.
mean()
Mean of the skew normal distribution.
SkewNormal$mean()
The mean of the skew normal distribution.
mode()
Mode of the skew normal distribution.
SkewNormal$mode()
The mode of the skew normal distribution.
sd()
Standard deviation of the skew normal distribution.
SkewNormal$sd()
The standard deviation of the skew normal distribution.
variance()
Variance of the skew normal distribution.
SkewNormal$variance()
The variance of the skew normal distribution.
skewness()
Skewness of the skew normal distribution.
SkewNormal$skewness()
The skewness of the skew normal distribution.
kurtosis()
Kurtosis of the skew normal distribution.
SkewNormal$kurtosis()
The kurtosis of the skew normal distribution.
kurtosisExcess()
Kurtosis excess of the skew normal distribution.
SkewNormal$kurtosisExcess()
The kurtosis excess of the skew normal distribution.
clone()
The objects of this class are cloneable with this method.
SkewNormal$clone(deep = FALSE)
deepWhether to make a deep clone.
A R6 class to represent a non-central Student distribution.
nuGet or set the value of nu.
deltaGet or set the value of delta.
new()
New Student distribution.
Student$new(nu, delta)
nudegrees of freedom parameter, >0
deltanon-centrality parameter
A Student object.
d()
Density function of the Student distribution.
Student$d(x)
xnumeric vector
The density evaluated at x.
p()
Cumulative distribution function of the Student distribution.
Student$p(q, lower = TRUE)
qnumeric vector of quantiles
lowerBoolean, whether to deal with the lower tail
The cumulative probabilities corresponding to q.
q()
Quantile function of the Student distribution.
Student$q(p, lower = TRUE)
pnumeric vector of probabilities
lowerBoolean, whether to deal with the lower tail
The quantiles corresponding to p.
r()
Sampling from the Student distribution.
Student$r(n)
nnumber of simulations
A numeric vector of length n.
mean()
Mean of the Student distribution.
Student$mean()
The mean of the Student distribution.
median()
Median of the Student distribution.
Student$median()
The median of the Student distribution.
mode()
Mode of the Student distribution.
Student$mode()
The mode of the Student distribution.
sd()
Standard deviation of the Student distribution.
Student$sd()
The standard deviation of the Student distribution.
variance()
Variance of the Student distribution.
Student$variance()
The variance of the Student distribution.
skewness()
Skewness of the Student distribution.
Student$skewness()
The skewness of the Student distribution.
kurtosis()
Kurtosis of the Student distribution.
Student$kurtosis()
The kurtosis of the Student distribution.
kurtosisExcess()
Kurtosis excess of the Student distribution.
Student$kurtosisExcess()
The kurtosis excess of the Student distribution.
clone()
The objects of this class are cloneable with this method.
Student$clone(deep = FALSE)
deepWhether to make a deep clone.
The non-centrality parameter of the Student distribution in the
stats package is limited to abs(ncp) <= 37.62.
The present implementation allows a larger range.