occurrences vs NA predictor values

239 views
Skip to first unread message

Fernando Mardones

unread,
Mar 13, 2012, 4:02:59 PM3/13/12
to Maxent, rhij...@gmail.com
Guys,

After maxent(x,p),
I got the following:
"0.059809% of the presence points have NA predictor values"

I translate this as having 2 obs that are outside the environmental
data.
Is there any argument that I can use in order to dismiss those
observations? is there a way to identify such observations, and
eventually, delete them from the data?

Appreciate your help,
Thanks, Fernando


Robert J. Hijmans

unread,
Mar 13, 2012, 4:57:29 PM3/13/12
to Fernando Mardones, Maxent, rhij...@gmail.com
Fernando, 

It is probably good to mention that your are using the maxent function in R package dismo (that calls the maxent java program)

These observations are not used in the model. To identify and remove them, you can do something like:

v <- extract(x, p)
# which rows (points) have NA values?
i <- which(apply(is.na(v), 1,  sum) > 0)
# remove these from p
p <- p[-i, ]

Robert

Fernando Mardones

unread,
Mar 13, 2012, 8:16:35 PM3/13/12
to Maxent
Dear Robert. Did work perfectly!
Many thanks, Fernando

On Mar 13, 1:57 pm, "Robert J. Hijmans" <r.hijm...@gmail.com> wrote:
> Fernando,
>
> It is probably good to mention that your are using the maxent function in R
> package dismo (that calls the maxent java program)
>
> These observations are not used in the model. To identify and remove them,
> you can do something like:
>
> v <- extract(x, p)
> # which rows (points) have NA values?
> i <- which(apply(is.na(v), 1,  sum) > 0)
> # remove these from p
> p <- p[-i, ]
>
> Robert
>
Reply all
Reply to author
Forward
0 new messages