Skip to contents

This function is designed to generate random data following a Log-logistic distribution with parameters scale and shape.

Usage

rloglogis(n, scale, shape)

Arguments

n

number of observations.

scale

scale parameter. Must be strictly positive.

shape

shape parameter. Must be strictly positive.

Value

A vector containing data distributed according to the Log-logistic distribution with a sample size specified by n, and with scale and shape parameters specified by scale and shape, respectively.

Details

The Log-logistic distribution with parameters scale = \(\alpha\) and shape = \(\beta\) has the probability density function: $$f_{X}(x) = \dfrac{(\beta/\alpha)(x/\alpha)^{\beta-1}}{(1 + (x/\alpha)^{\beta})^{2}}$$ for \(x\geq 0\), \(\theta>0\) and \(\alpha>0\).

Examples

rloglogis(10, 5, 2)
#>  [1]  8.585635 10.614291  2.529501 14.336946 77.043781  3.525861  3.963860
#>  [8]  9.245616  2.681198  3.646639
rloglogis(100, 10, 6)
#>   [1] 10.275305  9.304696 12.911647 13.205687  6.845540 10.649405 11.143473
#>   [8]  9.020311  9.823042 13.381961 10.087681 13.275447 10.961867  8.749679
#>  [15] 14.711354  9.432616 10.855580  9.984692 13.401484 10.475055 10.919677
#>  [22]  9.009890 11.780220  9.663815  9.486840 10.624214  9.404611  6.375124
#>  [29] 10.121270 11.760978 12.912255 13.156251 14.216024 11.040216 11.527289
#>  [36] 21.959055  8.320823  8.893109  7.901430 11.636283 13.103547 10.368636
#>  [43]  7.628689 16.058559  9.397914 11.732090 11.612540  7.021829  9.658999
#>  [50] 11.952008 10.442813  9.193891 10.599579  5.680930 13.692334  7.646407
#>  [57] 10.711779 10.274733 11.777399  9.475518 16.367134  6.127948  7.683984
#>  [64]  9.708746 12.625450  8.757598  9.419824  9.069583 10.722879 29.221435
#>  [71] 10.039039 12.530251  9.422469  9.742173  7.283109 11.022754  8.459696
#>  [78]  5.152079  9.805541 13.990037  9.991022 12.192405  9.476077 14.088924
#>  [85]  8.945105 14.760710 11.138174  7.102760 12.995031  9.428319  6.054813
#>  [92]  9.847387  9.822104 11.876155  9.917255  8.933785  9.826300 18.434204
#>  [99]  7.106300 13.386411