ppm(nztrees ~1, Poisson())
# fit the stationary Poisson process to 'nztrees'
# no edge correction needed
lon <- longleaf
# \testonly{
lon <- lon[seq(1, npoints(lon), by=50)]
# }
longadult <- unmark(subset(lon, marks >= 30))
ppm(longadult ~ x, Poisson())
# fit the nonstationary Poisson process
# with intensity lambda(x,y) = exp( a + bx)
# trees marked by species
lans <- lansing
# \testonly{
lans <- lans[seq(1, npoints(lans), by=30)]
# }
ppm(lans ~ marks, Poisson())
# fit stationary marked Poisson process
# with different intensity for each species
# \donttest{
ppm(lansing ~ marks * polynom(x,y,3), Poisson())
# fit nonstationary marked Poisson process
# with different log-cubic trend for each species
# }
# \testonly{
# equivalent functionality - smaller dataset
ppm(amacrine ~ marks * polynom(x,y,2), Poisson())
# }
Run the code above in your browser using DataLab