| fun.simu.bimodal | R Documentation |
This function allows the user to simulate observations from a mixture of two generalised lambda distributions. It can be very useful for sensitivity analysis.
fun.simu.bimodal(result1, result2, prop1, prop2, len = 1000,
no.test = 1000, param1, param2)
result1 |
A vector comprising four values for the first generalised lambda distribution. |
result2 |
A vector comprising four values for the second generalised lambda distribution. |
prop1 |
Proportion of the first generalised lambda distribution |
prop2 |
1-prop1, this can be left unspecified. |
len |
Length of object for each simulation run. |
no.test |
Number of simulation run. |
param1 |
This can be |
param2 |
This can be |
The length of object in len means how many observations should
be generated in each simulation run, with the number of simulation runs governed
by no.test.
A list with length equal to the number of simulation runs. Each subset of the
list has random observations equal to the the number specified in
len.
Steve Su
fun.theo.bi.mv.gld, fun.moments.bimodal,
fun.rawmoments
# Generate random observations from FMKL generalised lambda distributions with
# parameters (1,2,3,4) and (4,3,2,1) with 50% of data from each distribution.
junk<-fun.simu.bimodal(c(1,2,3,4),c(4,3,2,1),prop1=0.5,param1="fmkl",
param2="fmkl")
# Calculate the maximum number from each simulation run
sapply(junk,max)
# Calculate the median from each simulation run
sapply(junk,median)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.