smp_stats-methods: Basic statistics to evaluate sample and model parameters from...

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

Description

This function takes a SpNaBaMatrix or SpNaBaEps object and extract basic statistics about sample and parameters epsilon and score.

Usage

1

Arguments

x

A SpNaBaMatrix, SpNaBaEps, SpNaBaScore or SpNaBaModel object.

Details

Value

An object of class data.table.

Author(s)

Enrique Del Callejo Canal (edelcallejoc@gmail.com), based on implemented algortihms in web platform SPECIES (see References).

References

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

See Also

SpNaBaMatrix, grd_build, id_pts

SpNaBaEps, epsilon

SpNaBaScore, score

SpNaBaModel, NBModel

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 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)

smp_stats(x.mat)

# Checking stats for epsilon measure --------

# Counts calculation ----------------------------------

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

# Probability calculation -----------------------------

x.probs <- probs(x.counts)

# Estimating epsilon ----------------------------------

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

# Statistics

smp_stats(x.eps)

# Checking stats for score measure --------

# Score parameter -----------------------------------

x.score <- score(x.probs)

# Statistics

smp_stats(x.score)

# Fitting model --------

x.model <- NBModel(x.mat, target = 1:10, fac.lap = 0.01)

# Statistics

smp_stats(x.model)

edelcallejoc/rspecies documentation built on May 27, 2019, 7:25 a.m.