Description Usage Arguments Details Value Author(s) References See Also Examples
This function takes a SpNaBaMatrix
or SpNaBaEps
object and extract basic statistics about sample and parameters epsilon and score.
1 | smp_stats(x)
|
x |
A |
SpNaBaMatrix:Return a data.table with the follow structure.
Factor: The name of the factors included in the model.
N: Number of blocks in the partition of the sample space. If the model is not
for spatial data N represents the number of cases in the model. If the model is
for spatial data N represents the number of cell in the GRID
(see grd_build
).
Nw: Number of blocks with at least one observation of factor w. If the model is not for spatial data Nw represents the number of cases with presences of factor w. If the model is for spatial data Nw represents the number of cell in the GRID with at least one obervations of the factor w.
minObs: the minimum number of observatios per case of factor w. If the model is not for spatial data minObs = 1, i.e. one observation of factor w for any case with a presence of factor w. If the model is for spatial data minObs represents the minimum number of observations of factor w of all cells with at least one observations of factor w.
medianObs: the median of the number of observatios per case of factor w. If the model is not for spatial data medianObs = 1, i.e. one observation of factor w for any case with a presence of factor w. If the model is for spatial data medianObs represents the median of the number of observations of factor w of all cells with at least one observations of factor w.
maxObs: the maximum number of observatios per case of factor w. If the model is not for spatial data maxObs = 1, i.e. one observation of factor w for any case with a presence of factor w. If the model is for spatial data maxObs represents the maximum number of observations of factor w of all cells with at least one observations of factor w.
TotalObs: the total number of observatios of factor w. If the model is not for spatial data TotalObs = Nw, i.e. the total number of observations of factor w is equal to the number of cases with a presences of factor w. If the model is for spatial data TotalObs represents the total number of observations of factor w.
SpNaBaEps and SpNaBaScore:A List of two data.table with the follow structure. The first element of the list maps the epsilon of target variables. The second element of the list maps the epsilon of predictor variables.
Factor: The name of the factors included in the model.
Mean: The mean of epsilon.
Variance: The Variance of epsilon.
Std.Dev: The Std.Dev of epsilon.
Lower: The 25% quantile of epsilon.
Median: The Median of epsilon.
Upper: The 75% quantile of epsilon.
Max: The Max of epsilon.
SpNaBaModel:A List of 3 dobject. Each one with the descriptions of the function applied to the objects described below.
An object of class data.table
.
Enrique Del Callejo Canal (edelcallejoc@gmail.com), based on implemented algortihms in web platform SPECIES (see References).
http://species.conabio.gob.mx/
SpNaBaMatrix
, grd_build
, id_pts
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.