Jan Quets <jan.qu...@ua.ac.be> heeft geschreven:
 
>  Hello all, thx for the input this far.
> after having implemented the interesting code 
> professor Baddeley suggested, it seems that 'sort(X$marks)' and 'sort(rvals)'
> are however not the same vectors, which they should be 
> according to the proposed null model. 
 
You didn't say that you want each disc radius to be used only once 
(aka 'sampling without replacement'). 
 
To do that, change the line 
     con <- rmhcontrol(p=1)
to 
   con <- rmhcontrol(p=1, fixall=TRUE)
 
so that the algorithm will not resample the marks; and change the line
 
   sta <- rmhstart(n.start=k) 
to 
  sta <- rmhstart(x.start=XX)
 
where 'XX' is a point pattern that uses each mark exactly once (and satisfies 
the model constraints). 

> Also I don't understand the piece of code:
> marks(X) <- rvals[marks(X)]

Before this line is executed, X is a multitype point pattern; marks(X) is a 
factor ('categorical variable') with values that are effectively the numbers 1 
to m. You want the mark 1 to be replaced by the actual radius value rvals[1]. 
So after this line is executed, marks(X) is a numeric vector containing the 
actual mark values. If you plot the resulting pattern X as plot(X, markscale=1) 
then you'll see the discs.

===
Prof Adrian Baddeley (UWA/CSIRO)
CSIRO Mathematics, Informatics & Statistics
Leeuwin Centre, 65 Brockway Road, Floreat WA 6014, Australia
Tel: 08 9333 6177 | Fax: 08 9333 6121 | Mob: 0410 447 821

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to