Hello, I am writing cause I have a problem when try to create confidence envelopes in spatstat. I have a point data representing firms in my study area. When I try to create confidence envelopes the error message turns up: [> p <- envelope(point, fun=Kest, nsim=99) Error in marks.ppp(Y, dfok = FALSE) : Sorry, not implemented when the marks are a data frame] Could you write me how can I solve this problem please? Thank you Pavel -- View this message in context: http://r.789695.n4.nabble.com/Spatstat-Kest-envelope-problem-tp4657799.html Sent from the R help mailing list archive at Nabble.com.
You can solve this problem by actually *reading* the error
message. Evidently the object "point" is a marked point pattern
whose marks are in the form of a data frame.
So either:
(1) Do not create "point" as a marked point pattern --- i.e.
don't add a "marks" component when you create it, or
(2) Unmark it before you use it, e.g.:
ump <- unmark(point)
E <- envelope(ump)
Note that specifying "fun=Kest" and "nsim=99" is unnecessary
and
redundant. Those are the (current) default values of these arguments.
Note also that "point" is probably not a good name for a point pattern
object; too easily confused with the name of the function "points()".
cheers,
Rolf Turner
On 02/08/2013 02:57 AM, Pavel_K wrote:> Hello,
> I am writing cause I have a problem when try to create confidence envelopes
> in spatstat.
> I have a point data representing firms in my study area.
>
> When I try to create confidence envelopes the error message turns up:
>
> [> p <- envelope(point, fun=Kest, nsim=99)
> Error in marks.ppp(Y, dfok = FALSE) :
> Sorry, not implemented when the marks are a data frame]
>
> Could you write me how can I solve this problem please?
P. S. I just noticed that you referred to the envelopes produced as
"confidence" envelopes.
They are ***NOT*** confidence envelopes!!! They are "critical"
envelopes.
This is a very different concept. Repeat after me, 50 times:
critical envelopes, critical envelopes, critical envelopes, .....
cheers,
Rolf Turner
On 02/08/2013 02:57 AM, Pavel_K wrote:> Hello,
> I am writing cause I have a problem when try to create confidence envelopes
> in spatstat.
> I have a point data representing firms in my study area.
>
> When I try to create confidence envelopes the error message turns up:
>
> [> p <- envelope(point, fun=Kest, nsim=99)
> Error in marks.ppp(Y, dfok = FALSE) :
> Sorry, not implemented when the marks are a data frame]
>
> Could you write me how can I solve this problem please?