# Moment estimate
example.data = rgl(n=400,lambda1=c(0,1,0.4,0),
param="fkml")
fit.fkml.moments(example.data)
# Approximation to the standard normal distribution
norm.approx <- fit.fkml.moments.val(c(0,1,0,3))
norm.approx
# Another distribution with the same moments
another <- fit.fkml.moments.val(c(0,1,0,3),start=c(2,2))
another
# Compared
plotgld(norm.approx$lambda,ylim=c(0,0.75),main="Approximation to the standard normal",
sub="and another GLD with the same first 4 moments")
plotgld(another$lambda,add=TRUE,col=2)
Run the code above in your browser using DataLab