generate random samples from a beta distribution, parameterized as mean and sd, and returning NAs if conditions are not met
Arguments
- n
An integer value. The number of samples to generate
- p
A decimal value. The value used to calculate parameters for the beta distribution
- sd
A decimal value. The standard deviation of the beta distribution to simulate
Examples
rbeta_dmp(n=100,p=0.9,sd=0.01)
#> [1] 0.8857523 0.9079071 0.9057583 0.8982009 0.8824196 0.9059923 0.9067086
#> [8] 0.9154540 0.9004098 0.9071190 0.9052410 0.9052908 0.9049867 0.8949529
#> [15] 0.8925666 0.8943662 0.8914263 0.8990316 0.9003875 0.9001811 0.9049556
#> [22] 0.9084282 0.9198257 0.8811038 0.8982850 0.8930480 0.9024935 0.8837448
#> [29] 0.9046406 0.8886300 0.9078339 0.8964793 0.9068060 0.8876839 0.9181144
#> [36] 0.8959842 0.8966231 0.8919587 0.8860666 0.9104228 0.8930420 0.8933119
#> [43] 0.9033306 0.9123358 0.8889331 0.8945023 0.9096904 0.9121222 0.9095296
#> [50] 0.9006490 0.9081689 0.8956040 0.8910949 0.9053384 0.9075271 0.8871973
#> [57] 0.9021670 0.9161033 0.8896825 0.8973484 0.9060107 0.9044530 0.8969437
#> [64] 0.8966133 0.8956085 0.9043686 0.9076032 0.9005918 0.9167544 0.9022766
#> [71] 0.8968314 0.8995840 0.8946710 0.8976004 0.8904362 0.8726950 0.8965178
#> [78] 0.8962447 0.8792324 0.8985140 0.8965436 0.8968504 0.8913548 0.9028636
#> [85] 0.9176296 0.8954106 0.9046085 0.9138971 0.9146235 0.9014047 0.8948808
#> [92] 0.9077244 0.9110331 0.9002167 0.8983104 0.9030566 0.9114254 0.8926688
#> [99] 0.9045815 0.9100473