#===> load simulated data <===#
data(simdata)
X <- stpp(simdata$x, simdata$y, simdata$t)
#===> define conditional intensity function <===#
ci1 <- function(X, theta){theta[1]*exp(-theta[2]*X$x -
theta[3]*X$y - theta[4]*X$t)} #correct model
tresiduals1 <- thinresid(X, ci1, theta = c(3000, 2, 2, 2))
tresiduals2 <- thinresid(X, ci1, theta = c(2500, 5, 5, 10))
#===> plot results <===#
par(mfrow = c(1,2))
plot(tresiduals1)
plot(tresiduals2)
summary(tresiduals1)
summary(tresiduals2)
Run the code above in your browser using DataLab