# NOT RUN {
## simulation
pars <- c(mu1 = 10.0, mu2 = 40.0, nu = 30.0, sigma1 = 0.01, sigma2 = 0.03)
z <- SimulateTypeB(pars, seed = 257)
## estimation
## need very long c.p.u time in the minimization procedure
# }
# NOT RUN {
init.pars <- c(mu1 = 20.0, mu2 = 30.0, nu = 30.0, sigma1 = 0.02, sigma2 = 0.02)
z1 <- EstimateTypeB(z$offspring$xy, init.pars)
# Parameter mu1 mu2 nu sigma1 sigma2
# Initial value 20.0000 30.0000 30.0000 0.0200 0.0200
# MPLE 16.1778 44.3974 28.3942 0.0101 0.0312
# }
# NOT RUN {
## Palm intensity
par1 <- c(10.0, 40.0, 30.0, 0.01, 0.03) # pars
par2 <- c(16.1778, 44.3974, 28.3942, 0.0101, 0.0312) # z1$mple
PalmTypeB(z$offspring$xy, par1, par2)
# }
Run the code above in your browser using DataLab