This function will generate n random points from a rt
distribution with a user provided, df, ncp, and number of random
simulations to be produced. The function returns a tibble with the
simulation number column the x column which corresponds to the n randomly
generated points, the d_, p_ and q_ data points as well.
The data is returned un-grouped.
The columns that are output are:
sim_numberThe current simulation number.xThe current value ofnfor the current simulation.yThe randomly generated data point.dxThexvalue from thestats::density()function.dyTheyvalue from thestats::density()function.pThe values from the resulting p_ function of the distribution family.qThe values from the resulting q_ function of the distribution family.
Arguments
- .n
The number of randomly generated points you want.
- .df
Degrees of freedom, Inf is allowed.
- .ncp
Non-centrality parameter.
- .num_sims
The number of randomly generated simulations you want.
Details
This function uses the underlying stats::rt(), and its underlying
p, d, and q functions. For more information please see stats::rt()
See also
https://www.itl.nist.gov/div898/handbook/eda/section3/eda3664.htm
Other Continuous Distribution:
tidy_beta(),
tidy_burr(),
tidy_cauchy(),
tidy_chisquare(),
tidy_exponential(),
tidy_f(),
tidy_gamma(),
tidy_generalized_beta(),
tidy_generalized_pareto(),
tidy_geometric(),
tidy_inverse_burr(),
tidy_inverse_exponential(),
tidy_inverse_gamma(),
tidy_inverse_normal(),
tidy_inverse_pareto(),
tidy_inverse_weibull(),
tidy_logistic(),
tidy_lognormal(),
tidy_normal(),
tidy_paralogistic(),
tidy_pareto1(),
tidy_pareto(),
tidy_uniform(),
tidy_weibull(),
tidy_zero_truncated_geometric()
Other T Distribution:
util_t_stats_tbl()
Examples
tidy_t()
#> # A tibble: 50 × 7
#> sim_number x y dx dy p q
#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 1 -1.03 -24.5 1.47e- 4 0.245 -1.03
#> 2 1 2 0.510 -22.1 9.75e- 3 0.650 0.510
#> 3 1 3 1.75 -19.7 1.73e- 6 0.835 1.75
#> 4 1 4 1.60 -17.3 6.88e- 8 0.822 1.60
#> 5 1 5 -0.959 -14.9 4.84e- 3 0.257 -0.959
#> 6 1 6 0.287 -12.5 1.00e- 3 0.589 0.287
#> 7 1 7 -0.850 -10.1 7.17e-10 0.276 -0.850
#> 8 1 8 -0.356 -7.69 3.43e- 4 0.391 -0.356
#> 9 1 9 0.0557 -5.29 8.68e- 3 0.518 0.0557
#> 10 1 10 10.7 -2.89 2.82e- 2 0.970 10.7
#> # ℹ 40 more rows
