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?

  • $\begingroup$ Can you explain why you don't want to use a monotonic transformation? $\endgroup$ – Dason Mar 26 '13 at 17:29
  • $\begingroup$ @Dason because I need this also for other distributions, in which case the monotonic transformation does not work and I want to have a solution for all distributions. $\endgroup$ – jonathanyumps Mar 26 '13 at 17:31
  • 2
    $\begingroup$ Then why not explain your actual problem? $\endgroup$ – Dason Mar 26 '13 at 17:39

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
  • $\begingroup$ as I said: I DO NOT WANT TO USE the monotic transformation! $\endgroup$ – jonathanyumps Mar 26 '13 at 17:28
  • 2
    $\begingroup$ Good luck then :). Note that this method works for ANY distribution ;) $\endgroup$ – user1 Mar 26 '13 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.