#===> 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
sresiduals1 <- supresid(X, ci1, theta = c(3000, 2, 2, 2))
sresiduals2 <- supresid(X, ci1, theta = c(2500, 5, 5, 10))
#===> plot results <===#
par(mfrow = c(1,2))
plot(sresiduals1)
plot(sresiduals2)
summary(sresiduals1)
summary(sresiduals2)
Run the code above in your browser using DataLab