Skip to contents

This function generates random values from the random variable.

Arguments

n

Integer. Number of observations.

mu

Numeric. If it is provided and has length n, values will be used in each realization.

tau

Numeric. If it is provided and has length n, values will be used in each realization.

df

Integer. If it is provided and has length n, values will be used in each realization.

Value

A vector of numeric values.

See also

Examples


test <- rand_t(df = 12)
test$gen(10)
#>  [1]  0.97510056  0.37433776 -0.44801671 -1.31098250 -1.08235387  0.28841580
#>  [7] -0.83180065  0.39389265 -0.47373281  0.08233864

test$gen(3, mu = c(1,2,3), tau = c(2,3,4), df = 10)
#> [1] 2.334299 9.651929 2.889913