TF
defines the t-family distribution, a three parameter distribution,
for a gamlss.family
object to be used in GAMLSS fitting using the function gamlss()
.
The functions dTF
, pTF
, qTF
and rTF
define the density, distribution function, quantile function and random
generation for the specific parameterization of the t distribution given in details below, with mean equal to $\mu$
and standard deviation equal to $\sigma (\frac{\nu}{\nu-2})^{0.5}$ with the degrees of freedom $\nu$TF(mu.link = "identity", sigma.link = "log", nu.link = "log")
dTF(x, mu = 0, sigma = 1, nu = 10, log = FALSE)
pTF(q, mu = 0, sigma = 1, nu = 10, lower.tail = TRUE, log.p = FALSE)
qTF(p, mu = 0, sigma = 1, nu = 10, lower.tail = TRUE, log.p = FALSE)
rTF(n, mu = 0, sigma = 1, nu = 10)
mu.link
, with "identity" link as the default for the mu parametersigma.link
, with "log" link as the default for the sigma parameternu.link
, with "log" link as the default for the nu parameterlength(n) > 1
, the length is
taken to be the number requiredTF()
returns a gamlss.family
object which can be used to fit a t distribution in the gamlss()
function.
dTF()
gives the density, pTF()
gives the distribution
function, qTF()
gives the quantile function, and rTF()
generates random deviates. The latest functions are based on the equivalent R
functions for gamma distribution.gamlss.family
TF()# gives information about the default links for the t-family distribution
# library(gamlss)
#data(abdom)
#h<-gamlss(y~cs(x,df=3), sigma.formula=~cs(x,1), family=TF, data=abdom) # fits
#plot(h)
newdata<-rTF(1000,mu=0,sigma=1,nu=5) # generates 1000 random observations
hist(newdata)
Run the code above in your browser using DataLab