Hi List, I am attempting to obtain a qqplot for a ppm (point Poisson model) object. The object is a Geyer model ('Hard0'). The 'Saturation' and 'Interaction range' parameters for the Geyer model are obtained using profile log-likelihood ('profilepl').
I am using a spatial covariate (Z) which is a pixel image (dens_all). This covariate is causing problems for qqplot.ppm. I am getting the following error from qqplot.ppm; "ERROR : Error in rmhResolveExpansion(win, control, covims, "covariate") : Cannot expand the simulation window, because the covariate images do not cover the expanded window". My code is below. So, dear list, any suggestions on how to correct the qqplot.ppm error will be most appreciated!!! Many thanks in advance, Tom Richardson ########################################################## ########################################################## for (i in 1:length(unique(colony))) { for (j in 1: (length(unique(photo[colony==i]))) ) ## '-1' prevents any crossover between 2 colonies { wind <- owin(c(xmin , xmax ), c(ymin ,ymax ) ) ## a window points <- ppp(x=x[colony==i & photo==j],y=y[colony==i & photo==j], window= wind) ## Point pattern for a single photo all_points <- ppp(x=x[colony==i], y=y[colony==i], window= wind) ## A ppp for all photos overlaid ## intensity field; calculated over all photos superimposed dens_all <- as.im(density(all_points, kernel = "epanechnikov",correction = c("translate"))) ## use profile log-likelihood to select irregular parameters for the Geyer model: s <- expand.grid( r=seq(1,3, by=0.25), sat=seq(1,3,by=1)) pg <- profilepl(s, Geyer, points) GAMMA <- exp(pg$fit[6]$fitin$coefs[2]) #Gamma > 1: clustering, <1: regularity INTERACTION_RANGE <- pg$fit$interaction$par$r SATURATION <- pg$fit$interaction$par$sat ## Create a non-stationary model of the point process with the pixel image, 'dens_all' as a covariate. Hard0 <- ppm(points, ~ polynom(x,y,2) + Z, covariates=list(Z=dens_all), Geyer(INTERACTION_RANGE ,SATURATION)) ## Diagnostic plots for the model; diagnose.ppm(Hard0) qqplot.ppm(Hard0, fast=TRUE, plot.it=FALSE, nsim=50) ## Now check the interpoint interaction ## loops finish } } ########################################################## ########################################################## -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/qqplot-ppm-tp5555735p5555735.html Sent from the R-sig-geo mailing list archive at Nabble.com. _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo