fun.moments.bimodal | R Documentation |
This functions compute the mean, variance, skewness and kurtosis of the fitted generalised lambda distribution mixtures using Monte Carlo simulation.
fun.moments.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 |
There is also a theoretical computation of the moments in
fun.theo.bi.mv.gld
, it should be noted
that the theoretical moments may not exist. 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 matrix with four columns showing the mean, variance, skewness and kurtosis of the fitted generalised lambda distribution mixtures using Monte Carlo simulation. Each row represents a simulation run.
Steve Su
fun.theo.bi.mv.gld
, fun.simu.bimodal
,
fun.rawmoments
# Fitting the first column of the Old Faithful Geyser data
fit1<-fun.auto.bimodal.ml(faithful[,1],init1.sel="rmfmkl",init2.sel="rmfmkl",
init1=c(-0.25,1.5),init2=c(-0.25,1.5),leap1=3,leap2=3)
# After fitting compute the monte carlo moments using fun.moments.bimodal
fun.moments.bimodal(fit1$par[1:4],fit1$par[5:8],prop1=fit1$par[9],
param1="fmkl",param2="fmkl")
# It is also possible to compare this with the moments of the original dataset:
fun.moments(faithful[,1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.