
This is the R-help mailing list, not Prof. Baddeley's personal email.  
If you want to direct a
question to Prof. Baddeley (as is indeed appropriate in this instance 
since your question
is about spatstat) then sent an email to Prof. Baddeley, not to this list.

I *think* that the following will do what you want:

foo <- function(X,i,j,spar,...){
        Kij <- Kcross(X,i,j)
        gij <- pcf(Kij, method="d", spar=spar)
        lambda2 <- summary(X)$marks[j,"intensity"]
        eval.fv(lambda2 * gij)
}

fit <- ppm(amacrine, ~marks)

E <- 
envelope(amacrine,fun=foo,simulate=expression(rmh(fit,verbose=FALSE)),i="on",j="off",spar=0.7)

plot(E)

I have cc-ed this message to Prof. Baddeley who will doubtless correct 
any errors
or misconceptions in the forgoing.

     cheers,

     Rolf Turner

On 12/05/13 20:35, DingYi wrote:
> Dear Prof. Baddeley,
>
>     According to your suggestion 
> (https://stat.ethz.ch/pipermail/r-help/2005-December/084274.html), I 
> can run O-ring in library spatstat in R. Could you please told me how 
> to draw the confidence envelop lines of O-ring function in R? Thanks!


	[[alternative HTML version deleted]]

