-2

I have a non standardized t distribution with parameters $\nu$,$\beta$ (or sometimes also denoted by $\sigma^2$) and $\nu$. Now I want to get the quantiles of it. qt just calculates the quantile of a standardized t distribution, I know there exist a monotonic transformation, BUT I do not want to use this, so I want to calculate the quantile of a non-standardized t distribution. Is there any preimplemented function in R?

If there is no function, the quantile is the inverse of the cdf, how can I implement this in R?

1 Answers1

3

If you can calculate the quantiles of a standardised distribution $F(\cdot;\theta)$, where $\theta \in \Theta$ is a shape parameter, then the quantile function of the corresponding distribution with location and scale parameters $(\mu,\sigma)$ is simply

$$Q(p;\mu,\sigma,\theta)=\mu+\sigma F^{-1}(p;\theta).$$

In R, this can implemented for the Student-$t$ as follows

qnst <- function(p,mu,sigma,nu) return(mu + sigma*qt(p,df=nu))

# Quantile 0.25, mu = 10, sigma = 1, nu = 2
qnst(0.25,10,1,2)
user1
  • 31
  • 2