actually, I had it right all along. that is,
m- runif(); s- runif(); df-runif()*10+1 # get some
parameters...any parameters
x - rt( 10, df )*s + m # create random draws
library(MASS)
fitdistr(x, t) # confirm properties
will work. (josh suggested working with the skewness parameter, ncp,
dear R experts:
fitdistr suggests that a t with a mean of 1, an sd of 2, and 2.6
degrees of freedom is a good fit for my data.
now I want to draw random samples from this distribution.should I
draw from a uniform distribution and use the distribution function
itself for the transform, or is
Hi Ivo,
Try something like this:
rt(1e5, df = 2.6, ncp = (1 - 0) * sqrt(2.6 + 1)/2)
The NCP comes from the mean, N, and SD. See ?rt
Cheers,
Josh
On Fri, Mar 15, 2013 at 6:58 PM, ivo welch ivo.we...@anderson.ucla.edu wrote:
dear R experts:
fitdistr suggests that a t with a mean of 1, an
3 matches
Mail list logo