epsilon: Correlation method for the Spatial Naive Bayes Model

Description Usage Arguments Value Author(s) References See Also Examples

Description

epsilon is a function to estimates epsilon parameter for the Spatial Naive Bayes Model.

Usage

1
2
## S4 method for signature 'SpNaBaCounts,SpNaBaProbs'
epsilon(x.counts, x.probs)

Arguments

x.counts

A SpNaBaCounts object.

x.probs

A SpNaBaProbs object.

Value

epsilon: An object of class SpNaBaEps.

Author(s)

Enrique Del Callejo Canal ([email protected]), based on implemented algortihms in web platform SPECIES (see References).

References

http://species.conabio.gob.mx/

See Also

SpNaBaCounts, SpNaBaProbs, SpNaBa-methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Using the function id_pts() for spatial data --------

library(sp)
library(rgeos)
library(rgdal)
library(raster)

# Loading data
data(Mex0)
data(mammals)

# Generating de grid from Mex0 data
Mex0.grd<-grd_build(Mex0)

# Identification points of mammals
x.mat<-id_pts(grd = Mex0.grd, pts = mammals)

# Without target declaration --------------------------

system.time(x.counts <- counts(x.mat))

# With target declaration -----------------------------

x.counts <- counts(x.mat, target = 1:10)

# Probability matrices -----------------------------------
x.probs <- probs(x.counts, fac.lap = 0.1)

# Epsilon parameter -----------------------------------

x.eps <- epsilon(x.counts, x.probs)

edelcallejoc/rspecies documentation built on Jan. 22, 2019, 5:50 a.m.