2
$\begingroup$

How does one randomly sample from a T-distribution in R. From what I've found, the function rt in R doesn't let you specify the mean and standard deviation. For a normal distribution it is simply rnorm(x,mu,sd).

EDIT:

For the t-distribution there is a central and a non-central version. I want to know the difference between the two. In addition, if I want to specify the mean and standard deviation, does that automatically mean I am dealing with the non-central version of the t-distribution?

I chose to use the t-distribution because the data I am using are rather fat tailed and a t-distribution with a low degrees of freedom seems like a good idea. What other distributions are there for handling fat tailed data? Also it would be great if you can specify the function in R too.

$\endgroup$
11
  • 2
    $\begingroup$ This question appears to be what you are after. stackoverflow.com/questions/17843497/… $\endgroup$
    – Sycorax
    Oct 22, 2013 at 20:22
  • 2
    $\begingroup$ This question appears to be off-topic because it is only about how to use R. $\endgroup$ Oct 22, 2013 at 20:56
  • 1
    $\begingroup$ This question appears to be off-topic because it is about using/finding a function in R. There is an answer here stackoverflow.com/questions/17843497/… $\endgroup$
    – Momo
    Oct 22, 2013 at 20:58
  • 6
    $\begingroup$ I think this question is subtly on-topic. I don't think the real issue is 'what R function...' or 'how do I use the R function...'. The problem seems to be a confusion about what t-distributions are & how they are similar to / different from normal distributions. In addition, "how would a non central vs a central t affects [sic] my sampling?" is clearly on-topic. $\endgroup$ Oct 22, 2013 at 21:10
  • 2
    $\begingroup$ Please tell us how you plan to use these distributions in your data analysis. (A great many people come here with questions about distributions that are motivated by misconceptions about the underlying assumptions of their analyses, so we might as well get that cleared up at the outset.) $\endgroup$
    – whuber
    Oct 22, 2013 at 21:55

0