library(rgdal) # basic maps and coords
library(maptools) # tools to convert
# library(unmarked)
library (sf) # spatial maps
library (mapview) # nice html maps
library (spatstat) # distance maps
library (raster) # raster
library (readxl) # read excel data
library (tidyverse) # Data handling
library (dplyr) # Data frames handling
library (ggmap) # maps in ggplot
library (knitr) # make documents
library (xtable) # tables
library (kableExtra) #Table html
library (stargazer) # tables
library (tmap) #nice plain maps
library (tmaptools) # mas mapas
library (osmdata) # read osm
library (OpenStreetMap) # osm maps home <- "D:/BoxFiles/"
tnc <- "C:/Users/diego.lizcano/"
##### extra functions
source(paste(home, "Box Sync/CodigoR/Biodiv_Caqueta/R/TEAM_code.R", sep=""))
source(paste(home, "Box Sync/CodigoR/Biodiv_Caqueta/R/calendar.R", sep=""))
source(paste(home, "Box Sync/CodigoR/Biodiv_Caqueta/R/MultiSpeciesSiteOcc_Stan.R", sep=""))
##
datos.raw <- read_excel(paste(home, "Box Sync/CodigoR/Biodiv_Caqueta/data/Datos_cameratrap_Caqueta_fixed.xlsx", sep=""))Reading layer prediosAgroforesteriaPiedemonte' from data sourceD:Sync_Caqueta.shp’ using driver `ESRI Shapefile’ Simple feature collection with 1792 features and 26 fields geometry type: MULTIPOLYGON dimension: XY bbox: xmin: 1099776 ymin: 617840.4 xmax: 1141460 ymax: 670269.7 epsg (SRID): NA proj4string: +proj=tmerc +lat_0=4.596200416666666 +lon_0=-77.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs
Reading layer san_miguel' from data sourceD:Sync_Caqueta_miguel.shp’ using driver `ESRI Shapefile’ Simple feature collection with 292 features and 29 fields geometry type: MULTIPOLYGON dimension: XY bbox: xmin: 1089542 ymin: 614395 xmax: 1094099 ymax: 623402.5 epsg (SRID): NA proj4string: +proj=tmerc +lat_0=4.596200416666666 +lon_0=-77.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs
Reading layer prediosAgroforesteriaPiedemonte_sanMiguel_2' from data sourceD:Sync_Caqueta_sanMiguel_2.shp’ using driver `ESRI Shapefile’ Simple feature collection with 2084 features and 26 fields geometry type: MULTIPOLYGON dimension: XY bbox: xmin: 1089542 ymin: 614395 xmax: 1141460 ymax: 670269.7 epsg (SRID): NA proj4string: +proj=tmerc +lat_0=4.596200416666666 +lon_0=-77.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs
def_2019 <- raster(paste(home, "Box Sync/CodigoR/Biodiv_Caqueta/defore_raster/def_2019.tif", sep=""))
# casas.sp1 <- as(casas, "Spatial") # Create Spatial* object
# casas.sp <- as(casas.sp1, "SpatialPoints")
# casas.ppp <- as(casas.sp, "ppp") # make ppp
# casas.dist <- distmap(casas.ppp) # make distance map
#
# # datos.raw
# get the centroid
centercoord<- c(mean(as.numeric( datos.raw$Longitude)),
mean(as.numeric( datos.raw$Latitude)))
elevation<-raster::getData("SRTM",lon=centercoord[1], lat=centercoord[2])
e<-extent (-76.4, -75.7, 1.05, 1.65) # make the extent
elevation.crop<-crop(elevation, e) # cut elevation to small window
## save shp
# p <- as(e, 'SpatialPolygons')
# crs(p) <- "+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"
# shapefile(p, paste(tnc, "Box Sync/CodigoR/Biodiv_Caqueta/shp/extent.shp", sep=""))
# plot(elevation.crop)
# points(datos.raw$Longitude, datos.raw$Latitude, add=T)
datos.raw$Lon <- as.numeric(datos.raw$Longitude)
datos.raw$Lat <- as.numeric(datos.raw$Latitude)
# make a large sf object
datos.raw_sf = st_as_sf(datos.raw, coords = c("Lon", "Lat"),
crs = "+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")
camaras <- datos.raw_sf
# mapview (list(predios, camaras) ,
# zcol = list("COB_ACTUAL", "Sampling_Event"),
# cex= list(NA, 0.8),
# legend = list(TRUE, TRUE),
# col.regions = list(topo.colors, heat.colors), # terrain.colors
# alpha = list(0.5, 0.1),
# alpha.regions=list(0.5, 0.1)
# )
# tmap_mode("plot") ## tmap mode set to plotting
# fincas <- tm_shape(predios) + tm_polygons("COB_ACTUAL") +
# # tm_legend(show = FALSE) +
# tm_shape(camaras) +
# tm_symbols(col="red", size = 0.1)
#
# resgu <- tm_shape(san_miguel) + tm_polygons("COB_ACTUAL") +
# tm_shape(camaras) +
# tm_symbols(col="red", size = 0.1)
#
# tmap_arrange(resgu, fincas)
predios_sanMiguel.geo <- st_transform(predios_sanMiguel, "+proj=longlat +datum=WGS84 +ellps=WGS84
+towgs84=0,0,0")
tmap_mode("plot") ## tmap mode set to plotting
# # get fondo de osm
# bb <- c(-76.31, 1.05111 , -75.7, 1.65)
# caqueta_osm1 <- read_osm(bb, type="osm")
# qtm(CBS_osm1)
#
# tm_shape(predios_sanMiguel.geo) + tm_polygons("COB_ACTUAL", colorNA =NULL, border.col = "grey") +
# tm_shape(camaras) + # tm_symbols (col="red", size = 0.25) +
# tm_dots(col = "Sampling_Event", palette = "Dark2", size = 0.25,
# shape = 16, title = "Camara", legend.show = TRUE,
# legend.is.portrait = TRUE,
# legend.z = NA) +
# tm_layout(scale = .5,
# # legend.position = c(.78,.72),
# legend.outside.size = 0.1,
# legend.title.size = 1.6,
# legend.height = 0.9,
# legend.width = 1.5,
# legend.text.size = 1.2,
# legend.hist.size = 0.5) +
# tm_layout(frame=F) + tm_scale_bar()
# use osm data by bounding box
bb <- c(-76.31, 1.05111 , -75.7, 1.65)
# predios_map <- get_map(bb, maptype = "toner-background", zoom = 10)
# ggmap(predios_map) +
# geom_sf(data = camaras,
# inherit.aes = FALSE,
# colour = "red",
# fill = "#004529",
# alpha = .5,
# size = 4,
# shape = 21) +
# labs(x = "", y = "")
# get fondo de osm
caqueta_osm1 <- read_osm(bb, type="stamen-terrain") # type puede ser tambien bing, osm
qtm(caqueta_osm1) + tm_shape(predios_sanMiguel.geo) +
tm_polygons("COB_ACTUAL", colorNA =NULL, border.col = NULL, palette = "Dark2",) +
tm_shape(camaras) + # tm_symbols (col="red", size = 0.25) +
tm_dots(col = "Sampling_Event", palette = "Set1", size = 0.25,
shape = 16, title = "Camara", legend.show = TRUE,
legend.is.portrait = TRUE,
legend.z = NA) +
tm_layout(scale = .5,
# legend.position = c(.78,.72),
legend.outside.size = 0.1,
legend.title.size = 1.6,
legend.height = 0.9,
legend.width = 1.5,
legend.text.size = 1.2,
legend.hist.size = 0.5) +
tm_layout(frame=F) + tm_scale_bar()##### con facets
# tm_shape(predios_sanMiguel.geo) +
# tm_polygons("COB_ACTUAL", palette = "Dark2", colorNA =NULL, border.col = "grey") +
# tm_shape(camaras) + # tm_symbols (col="red", size = 0.25) +
# tm_dots(col = "red", size = 0.25,
# shape = 16, title = "Camara", legend.show = TRUE,
# legend.is.portrait = TRUE,
# legend.z = NA) + tm_facets(by = "Sampling_Event", free.coords = TRUE)
# tm_layout(scale = .5,
# # legend.position = c(.78,.72),
# legend.outside.size = 0.1,
# legend.title.size = 1.6,
# legend.height = 0.9,
# legend.width = 1.5,
# legend.text.size = 1.2,
# legend.hist.size = 0.5) +
# tm_layout(frame=F) + tm_scale_bar()Las trampas cámara permanecieron activas desde mediados de septiembre 2019 hasta comienzos de diciembre 2019.
Calendario fotografias, inicio y finalizacion de cada cámara
Las especies registradas en todo em muestreo fueron 87 entre aves y mamíferos.
Se detectaron 34 especies de mamíferos
| species | events | phothos | RAI | naiveoccu | |
|---|---|---|---|---|---|
| Dasyprocta fuliginosa | Dasyprocta fuliginosa | 207 | 207 | 3.96551724137931 | 0.741379310344828 |
| Cuniculus paca | Cuniculus paca | 231 | 231 | 4.42528735632184 | 0.620689655172414 |
| Cabassous unicinctus | Cabassous unicinctus | 28 | 28 | 0.53639846743295 | 0.293103448275862 |
| Tamandua tetradactyla | Tamandua tetradactyla | 62 | 62 | 1.18773946360153 | 0.482758620689655 |
| Dasypus novemcinctus | Dasypus novemcinctus | 143 | 143 | 2.73946360153257 | 0.568965517241379 |
| Eira barbara | Eira barbara | 66 | 66 | 1.26436781609195 | 0.551724137931034 |
| Canis lupus familiaris | Canis lupus familiaris | 18 | 18 | 0.344827586206897 | 0.275862068965517 |
| Procyon cancrivorus | Procyon cancrivorus | 37 | 37 | 0.708812260536398 | 0.258620689655172 |
| Leopardus wiedii | Leopardus wiedii | 6 | 6 | 0.114942528735632 | 0.0862068965517241 |
| Myoprocta pratti | Myoprocta pratti | 16 | 16 | 0.306513409961686 | 0.0517241379310345 |
| Dasypus unknown | Dasypus unknown | 40 | 40 | 0.766283524904214 | 0.241379310344828 |
| Dasypus kappleri | Dasypus kappleri | 35 | 35 | 0.670498084291188 | 0.258620689655172 |
| Marmosa unknown | Marmosa unknown | 10 | 10 | 0.191570881226054 | 0.0517241379310345 |
| Nasua nasua | Nasua nasua | 46 | 46 | 0.881226053639847 | 0.413793103448276 |
| Galictis vittata | Galictis vittata | 3 | 3 | 0.0574712643678161 | 0.0517241379310345 |
| Didelphis marsupialis | Didelphis marsupialis | 35 | 35 | 0.670498084291188 | 0.155172413793103 |
| Proechimys unknown | Proechimys unknown | 76 | 76 | 1.45593869731801 | 0.120689655172414 |
| Coendou prehensilis | Coendou prehensilis | 1 | 1 | 0.0191570881226054 | 0.0172413793103448 |
| Leopardus pardalis | Leopardus pardalis | 12 | 12 | 0.229885057471264 | 0.155172413793103 |
| Saimiri sciureus | Saimiri sciureus | 3 | 3 | 0.0574712643678161 | 0.0344827586206897 |
| Homo sapiens | Homo sapiens | 1 | 1 | 0.0191570881226054 | 0.0172413793103448 |
| Pecari tajacu | Pecari tajacu | 43 | 43 | 0.823754789272031 | 0.258620689655172 |
| Microsciurus flaviventer | Microsciurus flaviventer | 4 | 4 | 0.0766283524904215 | 0.0517241379310345 |
| Leopardus unknown | Leopardus unknown | 1 | 1 | 0.0191570881226054 | 0.0172413793103448 |
| Sciurus igniventris | Sciurus igniventris | 38 | 38 | 0.727969348659004 | 0.120689655172414 |
| Puma yagouaroundi | Puma yagouaroundi | 13 | 13 | 0.24904214559387 | 0.137931034482759 |
| Sciurus unknown | Sciurus unknown | 8 | 8 | 0.153256704980843 | 0.103448275862069 |
| Philander andersoni | Philander andersoni | 5 | 5 | 0.0957854406130268 | 0.0689655172413793 |
| Philander opossum | Philander opossum | 16 | 16 | 0.306513409961686 | 0.0517241379310345 |
| Caluromys lanatus | Caluromys lanatus | 1 | 1 | 0.0191570881226054 | 0.0172413793103448 |
| Puma concolor | Puma concolor | 6 | 6 | 0.114942528735632 | 0.0862068965517241 |
| Panthera onca | Panthera onca | 4 | 4 | 0.0766283524904215 | 0.0689655172413793 |
| Tremarctos ornatus | Tremarctos ornatus | 3 | 3 | 0.0574712643678161 | 0.0517241379310345 |
| Microsciurus unknown | Microsciurus unknown | 10 | 10 | 0.191570881226054 | 0.0344827586206897 |
RAI es: Relative Abundance Index
Riqueza de especies y acumulación, modelando la ocurrencia y la detectabilidad. Este análisis sigue el método de Dorazio et al. (2006).
############################################################
## Distribucion posterior de la riqueza de especies
############################################################
# Riqueza de especies y acumulación, modelando la ocurrencia y la detectabilidad.
# Este análisis sigue el método de Dorazio et al. (2006).
# 40 minutos en PC de casa
x <- as.matrix(row.per.sp)
X1 = as.matrix(row.per.sp) # col.per.sp por dias y row.per.sp por sitios (camaras)
nrepls = 90 #dias
especies = MultiSpeciesSiteOcc(nrepls=nrepls, x=X1) #### run stan## Posterior computed in 13.8757859349251 minutes
## Inference for Stan model: 9ba1cd7743adcbf9a81658d6760a5218.
## 4 chains, each with iter=5000; warmup=2500; thin=1;
## post-warmup draws per chain=2500, total post-warmup draws=10000.
##
## mean se_mean sd 2.5% 25% 50% 75% 97.5%
## alpha -1.30 0.01 0.35 -1.97 -1.53 -1.31 -1.08 -0.59
## beta -4.38 0.01 0.32 -5.08 -4.57 -4.35 -4.16 -3.81
## Omega 0.88 0.00 0.06 0.74 0.84 0.89 0.93 0.98
## sigma_uv[1] 1.46 0.01 0.28 1.02 1.26 1.42 1.62 2.08
## sigma_uv[2] 1.40 0.01 0.29 0.93 1.19 1.36 1.57 2.05
## rho_uv -0.04 0.00 0.24 -0.51 -0.20 -0.03 0.13 0.41
## E_N 35.19 0.03 2.44 29.78 33.62 35.46 37.03 39.03
## E_N_2 36.71 0.03 1.63 34.00 35.00 37.00 38.00 40.00
## lp__ -1736.70 0.19 8.29 -1754.16 -1742.10 -1736.18 -1730.85 -1721.80
## n_eff Rhat
## alpha 1101 1
## beta 823 1
## Omega 5383 1
## sigma_uv[1] 3005 1
## sigma_uv[2] 1555 1
## rho_uv 2306 1
## E_N 5383 1
## E_N_2 2715 1
## lp__ 1897 1
##
## Samples were drawn using NUTS(diag_e) at Sat Feb 22 22:30:31 2020.
## For each parameter, n_eff is a crude measure of effective sample size,
## and Rhat is the potential scale reduction factor on split chains (at
## convergence, Rhat=1).
# summary(especies$fit$sims.matrix)
# alpha.post = especies$fit$sims.matrix[,"alpha"]
# sigmaU.post = especies$fit$sims.matrix[,"sigma.u"]
# N.post = especies$fit$sims.matrix[,"N"]
# Stan Equivalent
alpha.post = especies$fit@sim$samples[[1]]$alpha
sigmaU.post = especies$fit@sim$samples[[1]]$`sigma_uv[1]`
N.post = especies$fit@sim$samples[[1]]$E_N
nsites = 58
cum_sp<-CumNumSpeciesPresent (nsites=nsites, alpha=alpha.post, sigmaU=sigmaU.post, N=N.post)# #histogram of posteriors openwinbugs
# hist(especies$fit$sims.matrix[,"N"],breaks = c(16:30), xlab="Number of mammal species", ylab="Relative frecuency", main="")
# abline(v=length(row.per.sp[,1]),col="blue", lty = 2) # -> lines.histogram(*) observadas
# abline(v=median(especies$fit$sims.matrix[,"N"]),col="red", lty = 2) # -> esperadas por detectabilidad
#
# mean(especies$fit$sims.matrix[,"N"])
# median(especies$fit$sims.matrix[,"N"])
hist(especies$fit@sim$samples[[1]]$E_N , xlab="Number of mammal species", ylab="Relative frecuency", main="")
abline(v=length(row.per.sp[,1]),col="blue", lty = 2) # -> lines.histogram(*) observadas
abline(v=median(especies$fit@sim$samples[[1]]$E_N),col="red", lty = 2) # -> esperadas por detectabilidad## [1] 35.16579
## [1] 35.50177
# ##Plot in ggplot
#
# sims <- extract(especies$fit);
#
# freq <- rep(0,S);
# N <- sims$E_N_2
# for (i in 1:length(N)){
# freq[N[i]] <- freq[N[i]] + 1
# }
#
# freq <- freq / length(N);
#
# dat <- data.frame(freq);
# dat <- cbind(1:S, dat);
# colnames(dat)[1] <- "N";
# # dat <- dat[80:90, ];
#
# N_bar_plot <-
# ggplot(data=dat, aes(x=N, y=freq)) +
# geom_bar(stat="identity") +
# scale_x_continuous(name="Mammal species (N)",
# breaks=c(0,34,35,36,37,38,39,40,41)) +
# scale_y_continuous(name="relative frequency",
# breaks=(0.1 * (0:6))) +
# ggtitle("Posterior: Number of Species (N)");
#
# plot(N_bar_plot);
#
# # Posterior Probabilities of Occurrence and Detection
#
# ilogit <- function(u) { return(1 / (1 + exp(-u))); }
#
# df_psi_theta <- data.frame(cbind(ilogit(sims$logit_psi_sim),
# ilogit(sims$logit_theta_sim)));
# colnames(df_psi_theta)[1] <- "psi";
# colnames(df_psi_theta)[2] <- "theta";
#
# psi_density_plot <-
# ggplot(df_psi_theta, aes(x=psi)) +
# geom_line(stat = "density", adjust=1) +
# scale_x_continuous(name="probability of occurrence",
# limits=c(0,1), breaks=(0.2 * (0:5))) +
# scale_y_continuous(name="probability density",
# limits=c(0,5), breaks=(0:4)) +
# ggtitle("Posterior: Occurrence (psi)");
#
# plot(psi_density_plot);
#
# #####################
# #### compare to vegan
# #####################
# library(vegan)
# sac <- specaccum(t(row.per.sp))
# plot(sac)
#
# sp1 <- specaccum(t(row.per.sp), method = "random")
# sp2 <- specaccum(t(row.per.sp), method = "rarefaction")
# sp3 <- specaccum(t(row.per.sp), method = "collector")
#
# # # summary(sp1)
# plot(sp1, ci.type="poly", col="blue", lwd=2, ci.lty=0, ci.col="lightblue")
# boxplot(sp1, col="yellow", add=TRUE, pch="+")
# #
# plot(sp2, ci.type="poly", col="blue", lwd=2, ci.lty=0, ci.col="lightblue") # rarefaction
# #plot(sp2)
# # boxplot(sp1, col="yellow", add=TRUE, pch="+")
#
# plot(sp3, ci.type="poly", col="blue", lwd=2, ci.lty=0, ci.col="lightblue")
# #plot(sp2)
#
# H <- diversity(t(row.per.sp))
# simp <- diversity(t(row.per.sp), "simpson")
# invsimp <- diversity(t(row.per.sp), "inv")
# r.2 <- rarefy(t(row.per.sp), 2)
# alpha <- fisher.alpha(t(row.per.sp))
# pairs(cbind(H, simp, invsimp, r.2, alpha), pch="+", col="blue")
#
# ## Species richness (S) and Pielou's evenness (J):
# S_1 <- specnumber(t(row.per.sp)) ## rowSums(BCI > 0) does the same...
# J <- H/log(S_1)
#
# rarecurve(row.per.sp)#,step = 20, sample = raremax)
# ## Rarefaction
# (raremax <- max(rowSums(row.per.sp)))
# Srare <- rarefy(t(row.per.sp), raremax)
# plot(S_1, Srare, xlab = "Observed No. of Species", ylab = "Rarefied No. of Species")
# abline(0, 1)
# rarecurve(row.per.sp)#, step = 2, sample = raremax, col = "blue", cex = 0.6)
# Especies observadas en azul = 34. Especies esperadas en rojo = 35.1-35.4. El número esperado esta corrregido por la detectabilidad.
Por géneros
## Select Mammals
datos.raw.mam <- filter(datos.raw, Class=="MAMMALIA")
###
## Google key
register_google(key = "AIzaSyDJmcl2kNxd_-qbmajoHobxa6G-RFR_f8s", write = TRUE)
overlay <- stat_density2d(
aes(x = Lon, y = Lat, fill = ..level.., alpha = ..level..),
bins = 10, geom = "polygon",
data = datos.raw.mam)
### add camera traps
map <- get_map(c(-76.058971, 1.335207), zoom = 10,
source = 'google', maptype = "terrain", color ="bw")
# ggmap(map) #, fullpage = TRUE)
g1<- ggmap(map, extent = 'device') + geom_point(data = datos.raw.mam,
aes(x=Lon, y=Lat),
colour = "red", size = I(2),
alpha = 1/10, na.rm = TRUE) +
overlay +
scale_fill_gradient(low = "blue", high = "red")
# con google
g3<- g1 + overlay + scale_fill_gradient(low = "blue", high = "red") +
facet_wrap(~ Genus, ncol = 7)
g3Se registraron 32 especies de aves.
Por géneros:
## Select Mammals
datos.raw.ave <- filter(datos.raw, Class=="AVES")
##
## Google key
## register_google(key = "AIzaSyDJmcl2kNxd_-qbmajoHobxa6G-RFR_f8s", write = TRUE)
overlay <- stat_density2d(
aes(x = Lon, y = Lat, fill = ..level.., alpha = ..level..),
bins = 10, geom = "polygon",
data = datos.raw.ave)
### add camera traps
map <- get_map(c(-76.058971, 1.335207), zoom = 10,
source = 'google', maptype = "terrain", color ="bw")
# ggmap(map) #, fullpage = TRUE)
g1<- ggmap(map, extent = 'device') + geom_point(data = datos.raw.ave,
aes(x=Lon, y=Lat),
colour = "red", size = I(2),
alpha = 1/10, na.rm = TRUE) +
overlay +
scale_fill_gradient(low = "blue", high = "red")
# con google
g3<- g1 + overlay + scale_fill_gradient(low = "blue", high = "red") +
facet_wrap(~ Genus, ncol = 8)
g3Usamos cuatro variables geográficas (altitud, pendiente, aspecto y rugosidad) y tres relacionadas a aspectos humanos (distancia a la deforestación, cobertura actual, y tipo de sitio (parque, resguardo, finca)).
# again
datos.raw.mam <- filter(datos.raw, Class=="MAMMALIA")
# elevation.crop
slope<-terrain(elevation.crop, opt=c("aspect", "slope"), unit='degrees', neighbors=4)
rough <- terrain(elevation.crop, opt = c("roughness"))
cam.cords <- as.data.frame(unique(cbind(datos.raw.mam$Lon, datos.raw.mam$Lat)))
coordinates(cam.cords) <- ~V1+V2 #make sppatial data fram
geo <- CRS("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0") #def cord
proj4string(cam.cords)<-geo # set cords
# convert deforestation to image, owin and put distances
def_2019_m <- projectRaster(def_2019, crs=crs(predios))
dist_def_owin <- distmap(as.owin(as.im(def_2019_m)))
dist_def_m <- raster(dist_def_owin, crs=crs(predios))# back to raster
dist_def <- projectRaster(from=dist_def_m, to=elevation.crop) # back to geo
## Camaras en parque
index_parque <- which(datos.raw.mam$Sampling_Event == "PNN Alto Fragua Indi Wasi")
datos.raw.mam.parq <- datos.raw.mam[index_parque,]
cams.in.park <- unique(datos.raw.mam.parq$Camera_Trap_Name)
# put names from unique.... not sure if correct!
cam.cords$Camera_Trap_Name <- unique(datos.raw.mam$Camera_Trap_Name)
## make sf
cam.cords.sf <- st_as_sf(cam.cords)
# Covs non scaled
elev.ovr <- raster::extract(elevation.crop, cam.cords, method='bilinear')
slope.ovr <- raster::extract(slope, cam.cords, method='bilinear')
rough.ovr <- raster::extract(rough, cam.cords, method='bilinear')
dist_def.ovr <- raster::extract(dist_def, cam.cords, method='bilinear')
# Covs scaled
elev.ovr.s <- raster::extract(scale(elevation.crop), cam.cords, method='bilinear')
slope.ovr.s <- raster::extract(scale(slope), cam.cords, method='bilinear')
rough.ovr.s <- raster::extract(scale(rough), cam.cords, method='bilinear')
dist_def.ovr.s <- raster::extract(scale(dist_def), cam.cords, method='bilinear')
# add to table
cam.cords$elev<-elev.ovr
cam.cords$slope<-slope.ovr[,1]
cam.cords$aspect<-slope.ovr[,2]
cam.cords$roughness<-rough.ovr
cam.cords$dist_def <- dist_def.ovr
cam.covs.s <- cam.cords %>% as.data.frame()
cam.covs.s2 <- cam.covs.s[,-1]
medias <- apply(cam.covs.s2, 2, mean)
desvi <- apply(cam.covs.s2, 2, sd)
#Standarize covs
cam.covs.s$elev <- (cam.covs.s2[,1]-medias[1])/desvi[1]
cam.covs.s$slope <- (cam.covs.s2[,2]-medias[1])/desvi[1]
cam.covs.s$aspect <- (cam.covs.s2[,3]-medias[3])/desvi[3]
cam.covs.s$roughness <- (cam.covs.s2[,4]-medias[4])/desvi[4]
cam.covs.s$dist_def <- (cam.covs.s2[,5]-medias[5])/desvi[5]
##
## Stack rasters
##
cov.stack<-stack(elevation.crop, slope, rough, dist_def)
names(cov.stack) <- c("elev", "slope", "aspect", "roughness", "dist_def" )
cov.stack.scale <- scale(cov.stack)
###
predios.geo <- st_transform(predios, geo)
### overlay cameras in predios old fashion
pts <- as_Spatial(cam.cords.sf) # make sp
p <- as_Spatial(predios.geo) # make sp
cams_in_predio<-over(pts, p) #
index_cams_in_predio <- which(!is.na(cams_in_predio$MUNICIPIO)) #
### overlay cameras in San Miguel
sanmiguel.geo <- st_transform(san_miguel, geo)
pts <- as_Spatial(cam.cords.sf) # make sp
p <- as_Spatial(sanmiguel.geo) # make sp
cams_in_resguar<-over(pts, p) #
index_cams_in_resguar <- which(!is.na(cams_in_resguar$MUNICIPIO))
### camaras parque
pts$Camera_Trap_Name <- as.character(pts$Camera_Trap_Name)
cam.cords.sf$COB_ACTUAL <- factor(cams_in_predio$COB_ACTUAL)
cam.cords.sf[index_cams_in_predio,]$COB_ACTUAL <- cams_in_predio[index_cams_in_predio,]$COB_ACTUAL
cam.cords.sf[index_cams_in_resguar,]$COB_ACTUAL <- cams_in_resguar[index_cams_in_resguar,]$COB_ACTUAL
cam.cords.sf[index_cams_in_resguar,]$COB_ACTUAL <- cams_in_resguar[index_cams_in_resguar,]$COB_ACTUAL
# put parque as bosques
cam.cords.sf[c(47,48,49,50,51,58),]$COB_ACTUAL <- cams_in_resguar[index_cams_in_resguar,]$COB_ACTUAL[1]
# put restante NAs como transicion
index_na <- which(is.na(cam.cords.sf$COB_ACTUAL))
cam.cords.sf[index_na,]$COB_ACTUAL <- factor(c(rep("vegetacion en transicion", 19)),levels=levels(cam.cords.sf$COB_ACTUAL))
### parque, resguardo, predio
### camaras parque
cam.cords.sf$Sitio <- NA
cam.cords.sf[index_cams_in_predio,]$Sitio <- "Predio"
cam.cords.sf[index_cams_in_resguar,]$Sitio <- "Resguardo"
# put parque
cam.cords.sf[c(47,48,49,50,51,58),]$Sitio <- "Parque"
# put restante NAs como fuera
index_na <- which(is.na(cam.cords.sf$Sitio))
cam.cords.sf[index_na,]$Sitio <- "Fuera"
#### cameras in park
# which(pts$Camera_Trap_Name == c( "CT-AFIW-1-1", "CT-AFIW-1-2"))
# which(pts$Camera_Trap_Name == c( "CT-AFIW-1-5", "CT-AFIW-1-6"))
# which(pts$Camera_Trap_Name == c( "CT-AFIW-1-4", "CT-AFIW-1-3"))
cam.covs.s$COB_ACTUAL <- cam.cords.sf$COB_ACTUAL
cam.covs.s$Sitio <- cam.cords.sf$Sitio
## COVARIABLES
cam.and.covs1<-as.data.frame(cam.covs.s)
# ### map covs
# mapview(cov.stack)
# ## map cams predios
# mapview(sanmiguel.geo, zcol ="COB_ACTUAL") +
# mapview(predios.geo, zcol="COB_ACTUAL") +
# mapview(cam.cords.sf, color="red", legend = FALSE, cex = 0.5)
pal8 <- c("#33A02C", "#B2DF8A", "#FDBF6F", "#1F78B4", "#999999", "#E31A1C", "#E6E6E6", "#A6CEE3")
palcam <- c("#B01FB5", "#08F3FF", "#E31A1C")
pal20 <- c("#003200", "#3C9600", "#006E00", "#556E19", "#00C800", "#8CBE8C",
"#467864", "#B4E664", "#9BC832", "#EBFF64", "#F06432", "#9132E6",
"#E664E6", "#9B82E6", "#B4FEF0", "#646464", "#C8C8C8", "#FF0000",
"#FFFFFF", "#5ADCDC")
ele <- tm_shape(cov.stack) +
tm_raster("elev", palette = "-viridis", n = 15, title = "Elevation") +
tm_shape(camaras) + # tm_symbols (col="red", size = 0.25) +
tm_dots(col = "Sampling_Event", palette = palcam, size = 0.20,
shape = 16, title = "Camara", legend.show = TRUE,
legend.is.portrait = TRUE,
legend.z = NA) + tm_layout(
legend.title.size = 1.7) +
tm_layout(frame=F) + tm_scale_bar()
slo <- tm_shape(cov.stack) +
tm_raster("slope", palette = "viridis", n = 15, title = "Slope") +
tm_shape(camaras) + # tm_symbols (col="red", size = 0.25) +
tm_dots(col = "Sampling_Event", palette = palcam, size = 0.20,
shape = 16, title = "Camara", legend.show = TRUE,
legend.is.portrait = TRUE,
legend.z = NA) + tm_layout(
legend.title.size = 1.7) +
tm_layout(frame=F) + tm_scale_bar()
asp <- tm_shape(cov.stack) +
tm_raster("aspect", palette = "YlGn", n = 15, title = "Aspect") +
tm_shape(camaras) + # tm_symbols (col="red", size = 0.25) +
tm_dots(col = "Sampling_Event", palette = palcam, size = 0.20,
shape = 16, title = "Camara", legend.show = TRUE,
legend.is.portrait = TRUE,
legend.z = NA) + tm_layout(
legend.title.size = 1.7) +
tm_layout(frame=F) + tm_scale_bar()
rou <- tm_shape(cov.stack) +
tm_raster("roughness", palette = "-YlGn", n = 15, title = "Roughness") +
tm_shape(camaras) + # tm_symbols (col="red", size = 0.25) +
tm_dots(col = "Sampling_Event", palette = palcam, size = 0.20,
shape = 16, title = "Camara", legend.show = TRUE,
legend.is.portrait = TRUE,
legend.z = NA) + tm_layout(
legend.title.size = 1.7) +
tm_layout(frame=F) + tm_scale_bar()
dis <- tm_shape(cov.stack) +
tm_raster("dist_def", palette = "-plasma", n = 15, title = "Deforestation distance") +
tm_shape(camaras) + # tm_symbols (col="red", size = 0.25) +
tm_dots(col = "Sampling_Event", palette = palcam, size = 0.20,
shape = 16, title = "Camara", legend.show = TRUE,
legend.is.portrait = TRUE,
legend.z = NA) + tm_layout(
legend.title.size = 1.7) +
tm_layout(frame=F) + tm_scale_bar()
# tmap_arrange(ele, slo, asp, rou)
ele#xtable (as.data.frame(cam.and.covs1))
kable(as.data.frame(cam.and.covs1)) %>%
kable_styling(bootstrap_options =
c("striped", "hover", "condensed", font_size = 9))| Camera_Trap_Name | elev | slope | aspect | roughness | dist_def | V1 | V2 | COB_ACTUAL | Sitio |
|---|---|---|---|---|---|---|---|---|---|
| CT-AFIW-1-8 | -0.6693649 | -2.322020 | -0.4251662 | -1.3012782 | 0.6104946 | -75.84083 | 1.535806 | bosques | Predio |
| CT-AFIW-1-7 | -0.5386041 | -2.309863 | 1.8462762 | -1.0614645 | -0.9869170 | -75.85028 | 1.522833 | vegetacion en transicion | Fuera |
| CT-AFIW-1-9 | -0.7564668 | -2.321654 | -0.0906407 | -1.5311548 | -0.1203147 | -75.84408 | 1.529000 | bosques | Predio |
| CT-AFIW-1-10 | -0.1767510 | -2.269216 | -0.5059435 | 1.0180896 | 0.0784244 | -75.82803 | 1.549139 | vegetacion en transicion | Fuera |
| CT-AFIW-1-11 | -0.4186949 | -2.259077 | -0.3675547 | 1.2902977 | 0.6054175 | -75.83436 | 1.545139 | bosques | Predio |
| CT-AFIW-1-12 | -0.4625065 | -2.314275 | 1.5049021 | -0.8734253 | -1.2088627 | -75.82222 | 1.542028 | bosques | Predio |
| CT-AFIW-1-14 | -0.4311586 | -2.303041 | 1.3258099 | -0.8650163 | 0.2799432 | -75.81439 | 1.548500 | bosques | Predio |
| CT-AFIW-1-15 | -0.1009872 | -2.304512 | -0.4266258 | -0.8599201 | 0.6685820 | -75.81439 | 1.560083 | vegetacion en transicion | Fuera |
| CT-AFIW-1-16 | -0.6574776 | -2.297094 | -0.5635037 | -0.6375428 | 0.1701772 | -75.82061 | 1.550556 | bosques | Predio |
| CT-AFIW-1-17 | -0.3676774 | -2.267899 | 1.2806004 | 0.6945254 | -0.5295888 | -75.82644 | 1.535639 | bosques | Predio |
| CT-AFIW-1-18 | 0.3309294 | -2.280616 | -0.3319731 | 0.3844637 | 1.5780233 | -75.80931 | 1.568444 | bosques | Predio |
| CT-AFIW-1-19 | 0.3129630 | -2.258011 | -1.6612320 | 1.4920072 | 0.9817314 | -75.80200 | 1.564861 | vegetacion en transicion | Fuera |
| CT-AFIW-1-20 | -0.3180127 | -2.288361 | 1.1913468 | 0.3335194 | -0.1701827 | -75.81403 | 1.539361 | vegetacion en transicion | Fuera |
| CT-AFIW-1-21 | 0.1903066 | -2.262126 | 1.6356136 | 1.1602398 | 0.2683295 | -75.80667 | 1.542694 | vegetacion en transicion | Fuera |
| CT-AFIW-1-22 | 0.5813199 | -2.309726 | 0.8627371 | -0.5116304 | -0.4497380 | -75.80939 | 1.531167 | bosques | Predio |
| CT-AFIW-1-23 | -0.6942196 | -2.264736 | 0.4300611 | 0.6639633 | 0.0515561 | -75.83983 | 1.542611 | vegetacion en transicion | Fuera |
| CT-AFIW-1-24 | -0.2416896 | -2.293100 | -1.1938267 | 0.1323107 | -0.8950877 | -75.82006 | 1.535306 | vegetacion en transicion | Fuera |
| CT-AFIW-1-25 | -0.6881688 | -2.328005 | 0.8966592 | -1.5711683 | -0.5923906 | -75.87367 | 1.532194 | pastos | Predio |
| CT-AFIW-1-26 | -0.0912342 | -2.272599 | 0.2996924 | 0.3212615 | 1.0124212 | -75.88575 | 1.535056 | vegetacion en transicion | Fuera |
| CT-AFIW-1-27 | -0.3774312 | -2.309526 | -1.0262264 | -0.8780617 | 0.0263207 | -75.87864 | 1.534194 | vegetacion en transicion | Predio |
| CT-AFIW-1-28 | 0.8495252 | -2.257972 | -1.3946882 | 0.5368834 | -0.4432335 | -75.87706 | 1.553694 | vegetacion en transicion | Fuera |
| CT-AFIW-1-29 | 0.1984568 | -2.261883 | -1.9210438 | 0.9914195 | 1.2314749 | -75.88797 | 1.533139 | vegetacion en transicion | Fuera |
| CT-AFIW-1-30 | 0.5103741 | -2.240299 | -0.0158780 | 1.5404672 | 0.5478651 | -75.90219 | 1.529750 | vegetacion en transicion | Fuera |
| CT-AFIW-1-31 | -0.0221117 | -2.308882 | 0.4771265 | -0.9254035 | -0.0440753 | -75.88772 | 1.520833 | vegetacion en transicion | Fuera |
| CT-AFIW-1-32 | -0.0744297 | -2.294974 | -0.4256760 | -0.6435920 | -0.1050594 | -75.88717 | 1.518500 | vegetacion en transicion | Fuera |
| CT-AFIW-1-34 | -0.1691323 | -2.309295 | 0.2874015 | 0.3070988 | -0.3183033 | -75.92203 | 1.509222 | vegetacion en transicion | Fuera |
| CT-AFIW-1-35 | -0.2703956 | -2.312427 | 0.4476524 | -0.8247567 | -1.1739184 | -75.85139 | 1.516944 | vegetacion en transicion | Fuera |
| CT-AFIW-1-36 | -0.4937606 | -2.305720 | 0.4567440 | -1.1616162 | -0.7061692 | -75.85822 | 1.518222 | bosques | Predio |
| CT-AFIW-1-37 | -0.2357195 | -2.301665 | -0.3604720 | -0.5236833 | -0.1121556 | -75.86117 | 1.530611 | bosques | Predio |
| CT-AFIW-1-38 | 0.2481229 | -2.319956 | 1.4086757 | -1.4128627 | -1.3410184 | -75.87475 | 1.475444 | bosques | Predio |
| CT-AFIW-1-39 | -0.4255390 | -2.294659 | 1.3404286 | 0.1582374 | -0.9552180 | -75.87475 | 1.481750 | bosques | Predio |
| CT-AFIW-1-40 | -0.0415865 | -2.284170 | -0.8588986 | 0.1053042 | -0.0406261 | -75.88736 | 1.483444 | bosques | Predio |
| CT-AFIW-1-41 | 0.3632995 | -2.314655 | 0.5345403 | 0.1139631 | 0.6659447 | -75.89378 | 1.482111 | bosques | Predio |
| CT-AFIW-1-42 | 0.6202420 | -2.292063 | -0.3858112 | -0.4426666 | 0.4235581 | -75.89144 | 1.476472 | bosques | Predio |
| CT-AFIW-1-43 | 0.5511602 | -2.289567 | -1.4498003 | -0.3308345 | -0.5251492 | -75.88611 | 1.472972 | vegetacion en transicion | Fuera |
| CT-AFIW-1-44 | -0.7742559 | -2.264142 | 1.0291184 | 0.3215135 | -0.8016758 | -75.85000 | 1.483333 | vegetacion en transicion | Fuera |
| CT-AFIW-1-45 | -0.5242043 | -2.299789 | 0.1903305 | -0.4878956 | -0.1685666 | -75.86231 | 1.495083 | bosques | Predio |
| CT-AFIW-1-46 | -0.7914000 | -2.285993 | 0.9245992 | -0.3405309 | -0.4807521 | -75.86342 | 1.490500 | bosques | Predio |
| CT-AFIW-1-47 | -0.8548798 | -2.296439 | -1.9496149 | -0.5230203 | -1.2869491 | -75.86947 | 1.485278 | bosques | Predio |
| CT-AFIW-1-48 | -0.2429061 | -2.238501 | -1.8262325 | 2.2971894 | -1.2965552 | -75.87000 | 1.480528 | bosques | Predio |
| CT-AFIW-1-49 | -0.7362853 | -2.247935 | 0.9931458 | 1.0566121 | -1.2518536 | -75.83600 | 1.509417 | bosques | Predio |
| CT-AFIW-1-50 | -0.7178417 | -2.285756 | -1.4979455 | -0.3917217 | -0.6103341 | -75.84339 | 1.509611 | bosques | Predio |
| CT-AFIW-1-51 | -0.8776636 | -2.282890 | -1.0289258 | -0.2805530 | -0.4808293 | -75.84589 | 1.503972 | vegetacion en transicion | Predio |
| CT-AFIW-1-52 | -0.4244310 | -2.296001 | 0.2702602 | -0.4347180 | -1.1730784 | -75.85269 | 1.515667 | vegetacion en transicion | Fuera |
| CT-AFIW-1-53 | -0.2834987 | -2.302718 | 0.6081296 | -0.5134921 | -0.1851771 | -75.85917 | 1.511444 | bosques | Predio |
| CT-AFIW-1-54 | -0.1566151 | -2.305462 | 0.7101630 | -1.0182201 | -1.1811712 | -75.91242 | 1.473083 | bosques | Predio |
| CT-AFIW-1-1 | 2.3443358 | -2.275088 | -0.8071963 | 1.1580119 | 0.7003707 | -75.98244 | 1.462944 | bosques | Parque |
| CT-AFIW-1-2 | 3.4198179 | -2.251851 | -0.2752464 | 1.3901170 | 1.9192611 | -75.99000 | 1.461889 | bosques | Parque |
| CT-AFIW-1-5 | 3.7598909 | -2.261446 | -0.4766583 | 1.7417629 | 3.8350744 | -75.99850 | 1.484250 | bosques | Parque |
| CT-AFIW-1-6 | 1.7092723 | -2.271856 | -0.1262901 | 1.2120523 | 1.1911516 | -75.98210 | 1.480761 | bosques | Parque |
| CT-AFIW-1-4 | 2.3921858 | -2.260119 | 0.2267244 | 0.9944309 | 2.5720698 | -75.99278 | 1.478000 | bosques | Parque |
| CT-AFIW-1-55 | -1.0767768 | -2.308525 | -0.4125192 | -0.8228893 | -0.3565134 | -76.24292 | 1.134000 | bosques | Resguardo |
| CT-AFIW-1-56 | -0.6381828 | -2.323538 | 1.2787608 | -1.1562312 | 0.2747134 | -76.24994 | 1.139889 | bosques | Resguardo |
| CT-AFIW-1-57 | -0.5709431 | -2.307542 | -0.2577885 | -0.5246787 | 0.1866435 | -76.24947 | 1.147750 | bosques | Resguardo |
| CT-AFIW-1-58 | -0.6819952 | -2.282662 | 1.3117846 | 0.3015049 | 0.0872361 | -76.24950 | 1.155778 | bosques | Resguardo |
| CT-AFIW-1-59 | -1.0218654 | -2.332652 | 0.4657523 | -1.8622968 | -0.7643528 | -76.25644 | 1.156389 | bosques | Resguardo |
| CT-AFIW-1-60 | -0.6751600 | -2.273788 | -1.5041163 | 1.9936310 | -0.6378988 | -76.25950 | 1.147111 | bosques | Resguardo |
| CT-AFIW-1-3 | 1.3898227 | -2.277139 | -0.6675421 | 1.0014478 | 1.4269314 | -75.98692 | 1.474000 | bosques | Parque |
# ## nearest neibour operations
# library(nngeo)
#
# # Spatial join in sf
# p1 = st_join(cam.cords.sf, predios.geo, join = st_nn)
# p1
#
# # Visuzlize join
# l = st_connect(cam.cords.sf, predios.geo, dist = 1)
# plot(st_geometry(predios.geo))
# plot(st_geometry(cam.cords.sf), add = TRUE)
# plot(st_geometry(l), col = "red", lwd = 2, add = TRUE)Las covariables numéricas se estandarizaron, centradas en cero.
Construimos 21 modelos generales para probar de forma automatizada cada especie con más de 10 registros.
##########################################
######### Models
##########################################
f.sp.occu.models <- function(sp_number){
########################
### make unmarked object
########################
library(unmarked)
sp15<-f.shrink.matrix.to15(matrix = mat.per.sp[[sp_number]])
sp_UMF <- unmarkedFrameOccu(sp15)
# plot(sp_UMF, panels=1)
# title(main=as.character(sp.names[sp_number]))
# add some covariates
siteCovs(sp_UMF) <- cam.and.covs1
#######################
## occu models
#######################
# covariates of detection and occupancy in that order.
fm0 <- occu(~ 1 ~ 1, sp_UMF)
fm1 <- occu(~ 1 ~ elev, sp_UMF, starts = c(0.01,0.01,0.01))
# fm1_1 <- occu(~ 1 ~ I(elev)^2, sp_UMF)
fm2 <- occu(~ 1 ~ slope, sp_UMF, starts = c(0.01,0.01,0.01))
fm3 <- occu(~ 1 ~ aspect, sp_UMF, starts = c(0.01,0.01,0.01))
fm4 <- occu(~ 1 ~ roughness, sp_UMF, starts = c(0.01,0.01,0.01))
fm5 <- occu(~ 1 ~ dist_def, sp_UMF, starts = c(0.01,0.01,0.01))
# fm5_5 <- occu(~ 1 ~ I(dist_def)^2, sp_UMF)
fm6 <- occu(~ 1 ~ COB_ACTUAL, sp_UMF, starts = c(0.0001,0.0001,0.01,0.001))
fm7 <- occu(~ 1 ~ Sitio, sp_UMF, starts = c(0.0001,0.0001,0.01,0.001,0.01))
fm8 <- occu(~ elev ~ elev, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm9 <- occu(~ elev ~ slope, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm10 <- occu(~ elev ~ aspect, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm11 <- occu(~ elev ~ roughness, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm12 <- occu(~ elev ~ dist_def, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm13 <- occu(~ elev ~ COB_ACTUAL, sp_UMF)
fm14 <- occu(~ elev ~ Sitio, sp_UMF)
fm15 <- occu(~ roughness ~ elev, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm16 <- occu(~ roughness ~ slope, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm17 <- occu(~ roughness ~ aspect, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm18 <- occu(~ roughness ~ roughness, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm19 <- occu(~ roughness ~ dist_def, sp_UMF, starts = c(0.01,0.01,0.01,0.1))
fm20 <- occu(~ roughness ~ COB_ACTUAL, sp_UMF)
fm21 <- occu(~ roughness ~ Sitio, sp_UMF)
# put the names of each model
models <- fitList(
'p(.)psi(.)' = fm0,
'p(.)psi(elev)' = fm1,
'p(.)psi(slope)' = fm2,
'p(.)psi(aspect)' = fm3,
'p(.)psi(roughness)' = fm4,
'p(.)psi(dist_def)' = fm5,
'p(.)psi(COB_ACTUAL)' = fm6,
'p(.)psi(Sitio)' = fm7,
'p(elev)psi(elev)' = fm8,
'p(elev)psi(slope)' = fm9,
'p(elev)psi(aspect)' = fm10,
'p(elev)psi(roughness)' = fm11,
'p(elev)psi(dist_def)' = fm12,
'p(elev)psi(COB_ACTUAL)' = fm13,
'p(elev)psi(Sitio)' = fm14,
'p(roughness)psi(elev)' = fm15,
'p(roughness)psi(slope)' = fm16,
'p(roughness)psi(aspect)' = fm17,
'p(roughness)psi(roughness)' = fm18,
'p(roughness)psi(dist_def)' = fm19,
'p(roughness)psi(COB_ACTUAL)' = fm20,
'p(roughness)psi(Sitio)' = fm21
)
ms <- modSel(models)
# (ms)
#This part store some models coeficients in a table (mat_models) to compare on screen
ms_AIC_models<-as.data.frame(ms@ Full[1], row.names = NULL) #store model name
modelo<-paste("_", as.character(as.character(sp.names[sp_number])),
"_", " models", sep="") # fix model name addin species
ma_nPars<-as.data.frame(ms@Full$nPars) #store parameter number
ms_AIC_values<- as.data.frame(ms@Full$AIC) #store AIC values
ms_AIC_delta<- as.data.frame(ms@Full$delta) #store AIC delta values
ms_AIC_AICwt<- as.data.frame(ms@Full$AICwt) #store AIC wt values
ms_AIC_cumultw<-as.data.frame(ms@Full$cumltvWt) #store model name
ms_m<-as.data.frame(row.names(ms_AIC_models)) #store m number
ms_formula<- as.data.frame(ms@Full$formula) #store model formula
mat_models <- cbind(ms_AIC_models, ma_nPars, ms_AIC_values, ms_AIC_delta, ms_AIC_AICwt, ms_AIC_cumultw) #paste in matrix
colnames(mat_models)<-c(modelo, "nPars",'AIC', "delta", "AICwt", "cumltvWt") # change row names
##Print los 7 primeros modelos
return(mat_models)
# xtable::xtable(mat_models, type = "html")
# kable(mat_models) # para pdf
# print(spname)
# print (mat_models[c(1:7),])
# as.character(sp.names[sp_number])
}Los datos se colapsaron a 15 dias (al estilo TEAM para evitar el Hessian error)
[1] “Dasyprocta fuliginosa”
sp1 <- f.sp.occu.models(sp_number = 1)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
# kable(sp1, booktabs = T)
kable(sp1) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Dasyprocta fuliginosa models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 7 | p(.)psi(COB_ACTUAL) | 4 | 715.4022 | 0.000000 | 0.2698736 | 0.2698736 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 716.9944 | 1.592212 | 0.1217351 | 0.3916087 |
| 1 | p(.)psi(.) | 2 | 717.3236 | 1.921410 | 0.1032599 | 0.4948686 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 717.4309 | 2.028642 | 0.0978693 | 0.5927378 |
| 6 | p(.)psi(dist_def) | 3 | 718.7541 | 3.351917 | 0.0505011 | 0.6432389 |
| 5 | p(.)psi(roughness) | 3 | 718.9570 | 3.554761 | 0.0456303 | 0.6888693 |
| 2 | p(.)psi(elev) | 3 | 719.2728 | 3.870575 | 0.0389651 | 0.7278344 |
| 4 | p(.)psi(aspect) | 3 | 719.3098 | 3.907567 | 0.0382510 | 0.7660854 |
| 3 | p(.)psi(slope) | 3 | 719.3141 | 3.911884 | 0.0381685 | 0.8042539 |
| 20 | p(roughness)psi(dist_def) | 4 | 720.3880 | 4.985738 | 0.0223111 | 0.8265650 |
| 19 | p(roughness)psi(roughness) | 4 | 720.5957 | 5.193465 | 0.0201101 | 0.8466751 |
| 13 | p(elev)psi(dist_def) | 4 | 720.7481 | 5.345859 | 0.0186347 | 0.8653098 |
| 16 | p(roughness)psi(elev) | 4 | 720.8800 | 5.477741 | 0.0174455 | 0.8827553 |
| 18 | p(roughness)psi(aspect) | 4 | 720.9046 | 5.502414 | 0.0172316 | 0.8999869 |
| 17 | p(roughness)psi(slope) | 4 | 720.9168 | 5.514562 | 0.0171273 | 0.9171142 |
| 12 | p(elev)psi(roughness) | 4 | 720.9533 | 5.551084 | 0.0168174 | 0.9339316 |
| 9 | p(elev)psi(elev) | 4 | 721.2697 | 5.867498 | 0.0143565 | 0.9482881 |
| 11 | p(elev)psi(aspect) | 4 | 721.3082 | 5.906005 | 0.0140828 | 0.9623709 |
| 10 | p(elev)psi(slope) | 4 | 721.3123 | 5.910052 | 0.0140543 | 0.9764252 |
| 8 | p(.)psi(Sitio) | 5 | 721.4707 | 6.068511 | 0.0129837 | 0.9894089 |
| 22 | p(roughness)psi(Sitio) | 6 | 723.0774 | 7.675221 | 0.0058144 | 0.9952233 |
| 15 | p(elev)psi(Sitio) | 6 | 723.4706 | 8.068421 | 0.0047767 | 1.0000000 |
Cuniculus paca
[1] “Cuniculus paca”
sp2 <- f.sp.occu.models(sp_number = 2)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp2) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Cuniculus paca models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 1 | p(.)psi(.) | 2 | 655.1402 | 0.0000000 | 0.0893170 | 0.0893170 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 655.1674 | 0.0272338 | 0.0881090 | 0.1774260 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 655.2356 | 0.0953721 | 0.0851578 | 0.2625837 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 655.6700 | 0.5297740 | 0.0685323 | 0.3311160 |
| 5 | p(.)psi(roughness) | 3 | 655.9334 | 0.7932182 | 0.0600743 | 0.3911903 |
| 12 | p(elev)psi(roughness) | 4 | 655.9393 | 0.7991316 | 0.0598970 | 0.4510873 |
| 3 | p(.)psi(slope) | 3 | 656.1977 | 1.0574579 | 0.0526393 | 0.5037265 |
| 10 | p(elev)psi(slope) | 4 | 656.2100 | 1.0697782 | 0.0523160 | 0.5560425 |
| 19 | p(roughness)psi(roughness) | 4 | 656.3057 | 1.1655463 | 0.0498699 | 0.6059125 |
| 17 | p(roughness)psi(slope) | 4 | 656.5753 | 1.4351133 | 0.0435816 | 0.6494941 |
| 2 | p(.)psi(elev) | 3 | 656.7711 | 1.6309523 | 0.0395164 | 0.6890105 |
| 9 | p(elev)psi(elev) | 4 | 656.7736 | 1.6333574 | 0.0394689 | 0.7284794 |
| 4 | p(.)psi(aspect) | 3 | 656.8727 | 1.7325360 | 0.0375594 | 0.7660388 |
| 11 | p(elev)psi(aspect) | 4 | 656.9367 | 1.7964753 | 0.0363776 | 0.8024164 |
| 6 | p(.)psi(dist_def) | 3 | 657.1375 | 1.9973472 | 0.0329015 | 0.8353179 |
| 16 | p(roughness)psi(elev) | 4 | 657.1891 | 2.0488817 | 0.0320645 | 0.8673824 |
| 13 | p(elev)psi(dist_def) | 4 | 657.1976 | 2.0574438 | 0.0319276 | 0.8993100 |
| 18 | p(roughness)psi(aspect) | 4 | 657.3220 | 2.1818305 | 0.0300024 | 0.9293123 |
| 20 | p(roughness)psi(dist_def) | 4 | 657.5821 | 2.4419325 | 0.0263436 | 0.9556559 |
| 15 | p(elev)psi(Sitio) | 6 | 658.5512 | 3.4110036 | 0.0162272 | 0.9718831 |
| 8 | p(.)psi(Sitio) | 5 | 658.6407 | 3.5005535 | 0.0155167 | 0.9873998 |
| 22 | p(roughness)psi(Sitio) | 6 | 659.0572 | 3.9169596 | 0.0126002 | 1.0000000 |
[1] “Cabassous unicinctus”
sp3 <- f.sp.occu.models(sp_number = 3)
# xtable::xtable(sp3) #, format = "rst")
# kable(Table1, "latex", booktabs = T) # para pdf
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp3) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Cabassous unicinctus models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 11 | p(elev)psi(aspect) | 4 | 227.7096 | 0.000000 | 0.5233951 | 0.5233951 |
| 4 | p(.)psi(aspect) | 3 | 230.7510 | 3.041428 | 0.1143910 | 0.6377861 |
| 18 | p(roughness)psi(aspect) | 4 | 232.8497 | 5.140128 | 0.0400558 | 0.6778419 |
| 2 | p(.)psi(elev) | 3 | 232.9590 | 5.249404 | 0.0379259 | 0.7157678 |
| 1 | p(.)psi(.) | 2 | 233.0813 | 5.371735 | 0.0356757 | 0.7514435 |
| 16 | p(roughness)psi(elev) | 4 | 233.6281 | 5.918460 | 0.0271427 | 0.7785861 |
| 6 | p(.)psi(dist_def) | 3 | 233.8047 | 6.095077 | 0.0248485 | 0.8034346 |
| 8 | p(.)psi(Sitio) | 5 | 234.0441 | 6.334481 | 0.0220452 | 0.8254799 |
| 12 | p(elev)psi(roughness) | 4 | 234.3199 | 6.610329 | 0.0192050 | 0.8446849 |
| 22 | p(roughness)psi(Sitio) | 6 | 234.6820 | 6.972417 | 0.0160246 | 0.8607095 |
| 3 | p(.)psi(slope) | 3 | 234.8771 | 7.167465 | 0.0145356 | 0.8752452 |
| 20 | p(roughness)psi(dist_def) | 4 | 234.8873 | 7.177675 | 0.0144616 | 0.8897068 |
| 9 | p(elev)psi(elev) | 4 | 234.9287 | 7.219129 | 0.0141650 | 0.9038718 |
| 13 | p(elev)psi(dist_def) | 4 | 234.9659 | 7.256294 | 0.0139042 | 0.9177760 |
| 10 | p(elev)psi(slope) | 4 | 235.0063 | 7.296748 | 0.0136258 | 0.9314017 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 235.0438 | 7.334191 | 0.0133730 | 0.9447748 |
| 5 | p(.)psi(roughness) | 3 | 235.0551 | 7.345546 | 0.0132973 | 0.9580721 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 235.2457 | 7.536150 | 0.0120886 | 0.9701607 |
| 17 | p(roughness)psi(slope) | 4 | 235.8335 | 8.123892 | 0.0090105 | 0.9791712 |
| 15 | p(elev)psi(Sitio) | 6 | 236.0392 | 8.329627 | 0.0081297 | 0.9873009 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 236.5188 | 8.809242 | 0.0063963 | 0.9936972 |
| 19 | p(roughness)psi(roughness) | 4 | 236.5483 | 8.838676 | 0.0063028 | 1.0000000 |
[1] “Tamandua tetradactyla”
sp4 <- f.sp.occu.models(sp_number = 4)
# xtable::xtable(sp4) #, format = "rst")
# kable(Table1, "latex", booktabs = T) # para pdf
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp4) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Tamandua tetradactyla models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 6 | p(.)psi(dist_def) | 3 | 398.0831 | 0.0000000 | 0.2143303 | 0.2143303 |
| 20 | p(roughness)psi(dist_def) | 4 | 398.1668 | 0.0836602 | 0.2055498 | 0.4198802 |
| 1 | p(.)psi(.) | 2 | 399.6696 | 1.5865329 | 0.0969555 | 0.5168357 |
| 13 | p(elev)psi(dist_def) | 4 | 399.7430 | 1.6598635 | 0.0934650 | 0.6103006 |
| 3 | p(.)psi(slope) | 3 | 401.4940 | 3.4108601 | 0.0389426 | 0.6492432 |
| 5 | p(.)psi(roughness) | 3 | 401.6182 | 3.5351271 | 0.0365966 | 0.6858398 |
| 4 | p(.)psi(aspect) | 3 | 401.6536 | 3.5705276 | 0.0359545 | 0.7217943 |
| 2 | p(.)psi(elev) | 3 | 401.6660 | 3.5829102 | 0.0357326 | 0.7575269 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 402.1130 | 4.0299001 | 0.0285760 | 0.7861029 |
| 16 | p(roughness)psi(elev) | 4 | 402.2143 | 4.1311538 | 0.0271653 | 0.8132683 |
| 19 | p(roughness)psi(roughness) | 4 | 402.2824 | 4.1992851 | 0.0262555 | 0.8395238 |
| 18 | p(roughness)psi(aspect) | 4 | 402.2919 | 4.2088280 | 0.0261305 | 0.8656543 |
| 17 | p(roughness)psi(slope) | 4 | 402.3058 | 4.2227347 | 0.0259495 | 0.8916038 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 402.9021 | 4.8189974 | 0.0192598 | 0.9108636 |
| 10 | p(elev)psi(slope) | 4 | 403.4898 | 5.4067040 | 0.0143560 | 0.9252196 |
| 12 | p(elev)psi(roughness) | 4 | 403.6078 | 5.5246849 | 0.0135336 | 0.9387532 |
| 9 | p(elev)psi(elev) | 4 | 403.6267 | 5.5435606 | 0.0134065 | 0.9521597 |
| 11 | p(elev)psi(aspect) | 4 | 403.6269 | 5.5438032 | 0.0134049 | 0.9655645 |
| 8 | p(.)psi(Sitio) | 5 | 403.8944 | 5.8112673 | 0.0117269 | 0.9772914 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 404.0992 | 6.0160527 | 0.0105856 | 0.9878770 |
| 22 | p(roughness)psi(Sitio) | 6 | 404.7096 | 6.6264505 | 0.0078013 | 0.9956783 |
| 15 | p(elev)psi(Sitio) | 6 | 405.8908 | 7.8077395 | 0.0043217 | 1.0000000 |
Dasypus novemcinctus
[1] “Dasypus novemcinctus”
sp5 <- f.sp.occu.models(sp_number = 5)
# xtable::xtable(sp5) #, format = "rst")
# kable(Table1, "latex", booktabs = T) # para pdf
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp5) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Dasypus novemcinctus models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 4 | p(.)psi(aspect) | 3 | 569.6456 | 0.0000000 | 0.1616436 | 0.1616436 |
| 18 | p(roughness)psi(aspect) | 4 | 570.1599 | 0.5142894 | 0.1249919 | 0.2866355 |
| 1 | p(.)psi(.) | 2 | 570.1713 | 0.5256178 | 0.1242860 | 0.4109215 |
| 11 | p(elev)psi(aspect) | 4 | 571.6391 | 1.9934384 | 0.0596608 | 0.4705823 |
| 6 | p(.)psi(dist_def) | 3 | 571.7062 | 2.0605884 | 0.0576909 | 0.5282732 |
| 3 | p(.)psi(slope) | 3 | 572.0754 | 2.4297541 | 0.0479672 | 0.5762404 |
| 2 | p(.)psi(elev) | 3 | 572.1602 | 2.5146121 | 0.0459745 | 0.6222149 |
| 5 | p(.)psi(roughness) | 3 | 572.1707 | 2.5250920 | 0.0457343 | 0.6679492 |
| 20 | p(roughness)psi(dist_def) | 4 | 572.2123 | 2.5666220 | 0.0447944 | 0.7127436 |
| 17 | p(roughness)psi(slope) | 4 | 572.4401 | 2.7944422 | 0.0399717 | 0.7527153 |
| 19 | p(roughness)psi(roughness) | 4 | 572.6128 | 2.9671195 | 0.0366654 | 0.7893808 |
| 16 | p(roughness)psi(elev) | 4 | 572.6190 | 2.9733243 | 0.0365519 | 0.8259326 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 572.7270 | 3.0813303 | 0.0346303 | 0.8605629 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 573.1707 | 3.5250204 | 0.0277402 | 0.8883031 |
| 13 | p(elev)psi(dist_def) | 4 | 573.6961 | 4.0504713 | 0.0213309 | 0.9096341 |
| 10 | p(elev)psi(slope) | 4 | 574.0501 | 4.4045149 | 0.0178702 | 0.9275043 |
| 9 | p(elev)psi(elev) | 4 | 574.1433 | 4.4976180 | 0.0170574 | 0.9445617 |
| 12 | p(elev)psi(roughness) | 4 | 574.1510 | 4.5053504 | 0.0169916 | 0.9615533 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 574.7068 | 5.0611532 | 0.0128689 | 0.9744223 |
| 8 | p(.)psi(Sitio) | 5 | 574.8393 | 5.1936947 | 0.0120438 | 0.9864660 |
| 22 | p(roughness)psi(Sitio) | 6 | 575.4021 | 5.7564415 | 0.0090900 | 0.9955560 |
| 15 | p(elev)psi(Sitio) | 6 | 576.8333 | 7.1876779 | 0.0044440 | 1.0000000 |
Eira barbara
[1] “Eira barbara”
sp6 <- f.sp.occu.models(sp_number = 6)
#xtable::xtable(sp6) #, format = "rst")
# kable(Table1, "latex", booktabs = T) # para pdf
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp6) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Eira barbara models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 1 | p(.)psi(.) | 2 | 422.1768 | 0.000000 | 0.1516514 | 0.1516514 |
| 5 | p(.)psi(roughness) | 3 | 423.2656 | 1.088844 | 0.0879847 | 0.2396361 |
| 3 | p(.)psi(slope) | 3 | 423.4021 | 1.225311 | 0.0821814 | 0.3218175 |
| 4 | p(.)psi(aspect) | 3 | 423.4120 | 1.235189 | 0.0817765 | 0.4035940 |
| 2 | p(.)psi(elev) | 3 | 423.8818 | 1.705042 | 0.0646549 | 0.4682489 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 423.9825 | 1.805696 | 0.0614815 | 0.5297304 |
| 6 | p(.)psi(dist_def) | 3 | 424.1201 | 1.943334 | 0.0573927 | 0.5871231 |
| 8 | p(.)psi(Sitio) | 5 | 424.8190 | 2.642192 | 0.0404671 | 0.6275901 |
| 12 | p(elev)psi(roughness) | 4 | 425.1340 | 2.957167 | 0.0345705 | 0.6621607 |
| 11 | p(elev)psi(aspect) | 4 | 425.1734 | 2.996586 | 0.0338958 | 0.6960565 |
| 19 | p(roughness)psi(roughness) | 4 | 425.2528 | 3.075978 | 0.0325766 | 0.7286331 |
| 10 | p(elev)psi(slope) | 4 | 425.2701 | 3.093322 | 0.0322954 | 0.7609285 |
| 18 | p(roughness)psi(aspect) | 4 | 425.2854 | 3.108579 | 0.0320499 | 0.7929784 |
| 17 | p(roughness)psi(slope) | 4 | 425.3894 | 3.212560 | 0.0304262 | 0.8234046 |
| 16 | p(roughness)psi(elev) | 4 | 425.7718 | 3.595042 | 0.0251300 | 0.8485347 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 425.7791 | 3.602345 | 0.0250384 | 0.8735731 |
| 9 | p(elev)psi(elev) | 4 | 425.8095 | 3.632716 | 0.0246611 | 0.8982342 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 425.8647 | 3.687879 | 0.0239902 | 0.9222244 |
| 13 | p(elev)psi(dist_def) | 4 | 425.8678 | 3.690985 | 0.0239530 | 0.9461773 |
| 20 | p(roughness)psi(dist_def) | 4 | 425.9447 | 3.767860 | 0.0230497 | 0.9692271 |
| 22 | p(roughness)psi(Sitio) | 6 | 426.7519 | 4.575060 | 0.0153952 | 0.9846222 |
| 15 | p(elev)psi(Sitio) | 6 | 426.7541 | 4.577324 | 0.0153778 | 1.0000000 |
Procyon cancrivorus
[1] “Procyon cancrivorus”
sp8 <- f.sp.occu.models(sp_number = 8)
# xtable::xtable(sp8) #, format = "rst")
# kable(Table1, "latex", booktabs = T) # para pdf
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp8) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Procyon cancrivorus models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 5 | p(.)psi(roughness) | 3 | 238.7272 | 0.0000000 | 0.1325675 | 0.1325675 |
| 3 | p(.)psi(slope) | 3 | 238.9068 | 0.1796588 | 0.1211782 | 0.2537456 |
| 19 | p(roughness)psi(roughness) | 4 | 239.1255 | 0.3983482 | 0.1086267 | 0.3623724 |
| 1 | p(.)psi(.) | 2 | 239.3428 | 0.6156725 | 0.0974418 | 0.4598142 |
| 17 | p(roughness)psi(slope) | 4 | 239.5004 | 0.7732636 | 0.0900585 | 0.5498727 |
| 12 | p(elev)psi(roughness) | 4 | 240.0899 | 1.3627129 | 0.0670699 | 0.6169426 |
| 2 | p(.)psi(elev) | 3 | 240.2201 | 1.4929359 | 0.0628420 | 0.6797846 |
| 10 | p(elev)psi(slope) | 4 | 240.3100 | 1.5828762 | 0.0600786 | 0.7398632 |
| 6 | p(.)psi(dist_def) | 3 | 241.2055 | 2.4782871 | 0.0383958 | 0.7782590 |
| 4 | p(.)psi(aspect) | 3 | 241.2240 | 2.4967975 | 0.0380421 | 0.8163011 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 242.0501 | 3.3229812 | 0.0251687 | 0.8414697 |
| 9 | p(elev)psi(elev) | 4 | 242.1212 | 3.3940650 | 0.0242899 | 0.8657596 |
| 16 | p(roughness)psi(elev) | 4 | 242.1904 | 3.4631953 | 0.0234646 | 0.8892242 |
| 13 | p(elev)psi(dist_def) | 4 | 242.7732 | 4.0460582 | 0.0175326 | 0.9067568 |
| 11 | p(elev)psi(aspect) | 4 | 242.8906 | 4.1634049 | 0.0165335 | 0.9232904 |
| 20 | p(roughness)psi(dist_def) | 4 | 242.9405 | 4.2133530 | 0.0161257 | 0.9394161 |
| 18 | p(roughness)psi(aspect) | 4 | 243.0587 | 4.3315062 | 0.0152007 | 0.9546167 |
| 8 | p(.)psi(Sitio) | 5 | 243.2335 | 4.5063598 | 0.0139281 | 0.9685449 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 243.7157 | 4.9885567 | 0.0109442 | 0.9794891 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 243.9604 | 5.2331894 | 0.0096842 | 0.9891733 |
| 15 | p(elev)psi(Sitio) | 6 | 245.0292 | 6.3020248 | 0.0056750 | 0.9948484 |
| 22 | p(roughness)psi(Sitio) | 6 | 245.2227 | 6.4955543 | 0.0051516 | 1.0000000 |
[1] “Myoprocta pratti”
sp10 <- f.sp.occu.models(sp_number = 10)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp10) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Myoprocta pratti models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 2 | p(.)psi(elev) | 3 | 72.40022 | 0.0000000 | 0.1557516 | 0.1557516 |
| 9 | p(elev)psi(elev) | 4 | 72.69409 | 0.2938689 | 0.1344682 | 0.2902198 |
| 16 | p(roughness)psi(elev) | 4 | 73.42207 | 1.0218571 | 0.0934413 | 0.3836612 |
| 6 | p(.)psi(dist_def) | 3 | 73.44185 | 1.0416345 | 0.0925219 | 0.4761830 |
| 8 | p(.)psi(Sitio) | 5 | 73.56036 | 1.1601386 | 0.0871990 | 0.5633821 |
| 13 | p(elev)psi(dist_def) | 4 | 73.66015 | 1.2599348 | 0.0829547 | 0.6463368 |
| 15 | p(elev)psi(Sitio) | 6 | 73.89557 | 1.4953564 | 0.0737429 | 0.7200796 |
| 20 | p(roughness)psi(dist_def) | 4 | 74.43497 | 2.0347503 | 0.0563109 | 0.7763905 |
| 22 | p(roughness)psi(Sitio) | 6 | 74.61786 | 2.2176434 | 0.0513898 | 0.8277803 |
| 1 | p(.)psi(.) | 2 | 75.61356 | 3.2133431 | 0.0312366 | 0.8590170 |
| 5 | p(.)psi(roughness) | 3 | 76.41240 | 4.0121787 | 0.0209507 | 0.8799677 |
| 12 | p(elev)psi(roughness) | 4 | 76.52661 | 4.1263940 | 0.0197878 | 0.8997555 |
| 4 | p(.)psi(aspect) | 3 | 77.00719 | 4.6069738 | 0.0155611 | 0.9153166 |
| 11 | p(elev)psi(aspect) | 4 | 77.01220 | 4.6119863 | 0.0155222 | 0.9308388 |
| 3 | p(.)psi(slope) | 3 | 77.29554 | 4.8953193 | 0.0134719 | 0.9443106 |
| 10 | p(elev)psi(slope) | 4 | 77.37690 | 4.9766854 | 0.0129348 | 0.9572454 |
| 19 | p(roughness)psi(roughness) | 4 | 77.41850 | 5.0182818 | 0.0126685 | 0.9699139 |
| 18 | p(roughness)psi(aspect) | 4 | 77.89755 | 5.4973282 | 0.0099702 | 0.9798841 |
| 17 | p(roughness)psi(slope) | 4 | 78.26147 | 5.8612558 | 0.0083115 | 0.9881956 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 79.48273 | 7.0825126 | 0.0045132 | 0.9927088 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 79.51813 | 7.1179084 | 0.0044340 | 0.9971428 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 80.39705 | 7.9968315 | 0.0028572 | 1.0000000 |
[1] “Dasypus kappleri”
sp12 <- f.sp.occu.models(sp_number = 12)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp12) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed"))| Dasypus kappleri models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 9 | p(elev)psi(elev) | 4 | 221.6454 | 0.000000 | 0.3311277 | 0.3311277 |
| 13 | p(elev)psi(dist_def) | 4 | 223.2863 | 1.640960 | 0.1457691 | 0.4768967 |
| 11 | p(elev)psi(aspect) | 4 | 224.0513 | 2.405954 | 0.0994372 | 0.5763340 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 224.3522 | 2.706813 | 0.0855497 | 0.6618837 |
| 10 | p(elev)psi(slope) | 4 | 224.5253 | 2.879904 | 0.0784571 | 0.7403408 |
| 12 | p(elev)psi(roughness) | 4 | 224.5261 | 2.880721 | 0.0784251 | 0.8187658 |
| 1 | p(.)psi(.) | 2 | 226.3961 | 4.750685 | 0.0307891 | 0.8495550 |
| 15 | p(elev)psi(Sitio) | 6 | 227.0319 | 5.386540 | 0.0224039 | 0.8719588 |
| 4 | p(.)psi(aspect) | 3 | 227.6255 | 5.980143 | 0.0166504 | 0.8886092 |
| 2 | p(.)psi(elev) | 3 | 227.6977 | 6.052287 | 0.0160605 | 0.9046697 |
| 6 | p(.)psi(dist_def) | 3 | 228.1268 | 6.481425 | 0.0129590 | 0.9176287 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 228.1795 | 6.534164 | 0.0126218 | 0.9302505 |
| 5 | p(.)psi(roughness) | 3 | 228.2262 | 6.580797 | 0.0123309 | 0.9425813 |
| 3 | p(.)psi(slope) | 3 | 228.2611 | 6.615754 | 0.0121172 | 0.9546985 |
| 16 | p(roughness)psi(elev) | 4 | 228.7666 | 7.121232 | 0.0094111 | 0.9641096 |
| 18 | p(roughness)psi(aspect) | 4 | 229.1253 | 7.479978 | 0.0078657 | 0.9719753 |
| 20 | p(roughness)psi(dist_def) | 4 | 229.3008 | 7.655405 | 0.0072052 | 0.9791805 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 229.6002 | 7.954807 | 0.0062034 | 0.9853839 |
| 19 | p(roughness)psi(roughness) | 4 | 229.7592 | 8.113811 | 0.0057293 | 0.9911133 |
| 17 | p(roughness)psi(slope) | 4 | 229.7610 | 8.115654 | 0.0057241 | 0.9968373 |
| 8 | p(.)psi(Sitio) | 5 | 231.8410 | 10.195628 | 0.0020232 | 0.9988606 |
| 22 | p(roughness)psi(Sitio) | 6 | 232.9893 | 11.343917 | 0.0011394 | 1.0000000 |
Didelphis marsupialis
[1] “Didelphis marsupialis”
sp16 <- f.sp.occu.models(sp_number = 16)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp16) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Didelphis marsupialis models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 1 | p(.)psi(.) | 2 | 174.1524 | 0.0000000 | 0.1077135 | 0.1077135 |
| 4 | p(.)psi(aspect) | 3 | 174.4711 | 0.3187225 | 0.0918460 | 0.1995595 |
| 18 | p(roughness)psi(aspect) | 4 | 174.4951 | 0.3427083 | 0.0907511 | 0.2903106 |
| 8 | p(.)psi(Sitio) | 5 | 174.9942 | 0.8418011 | 0.0707091 | 0.3610197 |
| 22 | p(roughness)psi(Sitio) | 6 | 175.2019 | 1.0495442 | 0.0637330 | 0.4247527 |
| 11 | p(elev)psi(aspect) | 4 | 175.7868 | 1.6343999 | 0.0475734 | 0.4723261 |
| 2 | p(.)psi(elev) | 3 | 176.0364 | 1.8839931 | 0.0419920 | 0.5143181 |
| 16 | p(roughness)psi(elev) | 4 | 176.0449 | 1.8924857 | 0.0418140 | 0.5561321 |
| 6 | p(.)psi(dist_def) | 3 | 176.1399 | 1.9875354 | 0.0398733 | 0.5960054 |
| 5 | p(.)psi(roughness) | 3 | 176.1418 | 1.9894599 | 0.0398350 | 0.6358404 |
| 3 | p(.)psi(slope) | 3 | 176.1439 | 1.9914994 | 0.0397944 | 0.6756347 |
| 19 | p(roughness)psi(roughness) | 4 | 176.2047 | 2.0523437 | 0.0386020 | 0.7142367 |
| 15 | p(elev)psi(Sitio) | 6 | 176.2535 | 2.1011282 | 0.0376718 | 0.7519084 |
| 17 | p(roughness)psi(slope) | 4 | 176.2890 | 2.1365995 | 0.0370095 | 0.7889179 |
| 20 | p(roughness)psi(dist_def) | 4 | 176.2954 | 2.1429925 | 0.0368914 | 0.8258093 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 176.3988 | 2.2463725 | 0.0350329 | 0.8608423 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 176.4898 | 2.3374436 | 0.0334735 | 0.8943157 |
| 13 | p(elev)psi(dist_def) | 4 | 177.2879 | 3.1355109 | 0.0224596 | 0.9167753 |
| 10 | p(elev)psi(slope) | 4 | 177.3248 | 3.1723767 | 0.0220494 | 0.9388248 |
| 9 | p(elev)psi(elev) | 4 | 177.3742 | 3.2217995 | 0.0215112 | 0.9603360 |
| 12 | p(elev)psi(roughness) | 4 | 177.3756 | 3.2232181 | 0.0214960 | 0.9818320 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 177.7120 | 3.5596213 | 0.0181680 | 1.0000000 |
Leopardus pardalis
[1] “Leopardus pardalis”
sp19 <- f.sp.occu.models(sp_number = 19)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp19) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Leopardus pardalis models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 1 | p(.)psi(.) | 2 | 123.4711 | 0.0000000 | 0.1157897 | 0.1157897 |
| 5 | p(.)psi(roughness) | 3 | 124.0431 | 0.5720713 | 0.0869854 | 0.2027751 |
| 2 | p(.)psi(elev) | 3 | 124.0807 | 0.6095930 | 0.0853687 | 0.2881438 |
| 3 | p(.)psi(slope) | 3 | 124.7971 | 1.3260064 | 0.0596666 | 0.3478104 |
| 8 | p(.)psi(Sitio) | 5 | 125.0476 | 1.5765783 | 0.0526405 | 0.4004509 |
| 4 | p(.)psi(aspect) | 3 | 125.1687 | 1.6976471 | 0.0495485 | 0.4499995 |
| 18 | p(roughness)psi(aspect) | 4 | 125.1791 | 1.7080815 | 0.0492907 | 0.4992901 |
| 13 | p(elev)psi(dist_def) | 4 | 125.2013 | 1.7302737 | 0.0487468 | 0.5480369 |
| 11 | p(elev)psi(aspect) | 4 | 125.4350 | 1.9639853 | 0.0433707 | 0.5914076 |
| 16 | p(roughness)psi(elev) | 4 | 125.4389 | 1.9678871 | 0.0432861 | 0.6346937 |
| 6 | p(.)psi(dist_def) | 3 | 125.4710 | 1.9999267 | 0.0425982 | 0.6772919 |
| 12 | p(elev)psi(roughness) | 4 | 125.4758 | 2.0047063 | 0.0424965 | 0.7197885 |
| 20 | p(roughness)psi(dist_def) | 4 | 125.6229 | 2.1518110 | 0.0394830 | 0.7592715 |
| 17 | p(roughness)psi(slope) | 4 | 125.7972 | 2.3261094 | 0.0361878 | 0.7954592 |
| 10 | p(elev)psi(slope) | 4 | 125.8265 | 2.3554781 | 0.0356603 | 0.8311195 |
| 9 | p(elev)psi(elev) | 4 | 125.9102 | 2.4391741 | 0.0341987 | 0.8653182 |
| 19 | p(roughness)psi(roughness) | 4 | 125.9349 | 2.4638522 | 0.0337794 | 0.8990976 |
| 22 | p(roughness)psi(Sitio) | 6 | 126.4524 | 2.9813272 | 0.0260785 | 0.9251761 |
| 15 | p(elev)psi(Sitio) | 6 | 126.8117 | 3.3406294 | 0.0217902 | 0.9469663 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 127.0252 | 3.5541087 | 0.0195842 | 0.9665505 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 127.2856 | 3.8145824 | 0.0171927 | 0.9837432 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 127.3976 | 3.9265249 | 0.0162568 | 1.0000000 |
Pecari tajacu
[1] “Pecari tajacu”
sp22 <- f.sp.occu.models(sp_number = 22)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp22) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Pecari tajacu models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 17 | p(roughness)psi(slope) | 4 | 235.2073 | 0.000000 | 0.6122422 | 0.6122422 |
| 19 | p(roughness)psi(roughness) | 4 | 238.8253 | 3.617946 | 0.1002989 | 0.7125411 |
| 16 | p(roughness)psi(elev) | 4 | 240.2313 | 5.024015 | 0.0496561 | 0.7621972 |
| 10 | p(elev)psi(slope) | 4 | 240.4732 | 5.265925 | 0.0439989 | 0.8061961 |
| 20 | p(roughness)psi(dist_def) | 4 | 240.8836 | 5.676286 | 0.0358371 | 0.8420333 |
| 9 | p(elev)psi(elev) | 4 | 241.0875 | 5.880163 | 0.0323640 | 0.8743973 |
| 18 | p(roughness)psi(aspect) | 4 | 241.8286 | 6.621263 | 0.0223426 | 0.8967399 |
| 13 | p(elev)psi(dist_def) | 4 | 242.1169 | 6.909580 | 0.0193431 | 0.9160830 |
| 12 | p(elev)psi(roughness) | 4 | 242.8539 | 7.646553 | 0.0133812 | 0.9294642 |
| 3 | p(.)psi(slope) | 3 | 243.1037 | 7.896364 | 0.0118100 | 0.9412742 |
| 11 | p(elev)psi(aspect) | 4 | 243.3928 | 8.185484 | 0.0102204 | 0.9514946 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 243.6492 | 8.441923 | 0.0089905 | 0.9604851 |
| 1 | p(.)psi(.) | 2 | 243.7734 | 8.566060 | 0.0084494 | 0.9689345 |
| 2 | p(.)psi(elev) | 3 | 244.3572 | 9.149879 | 0.0063103 | 0.9752449 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 244.7787 | 9.571344 | 0.0051113 | 0.9803562 |
| 6 | p(.)psi(dist_def) | 3 | 244.8122 | 9.604875 | 0.0050263 | 0.9853825 |
| 5 | p(.)psi(roughness) | 3 | 245.2554 | 10.048031 | 0.0040274 | 0.9894099 |
| 4 | p(.)psi(aspect) | 3 | 245.5102 | 10.302867 | 0.0035456 | 0.9929554 |
| 22 | p(roughness)psi(Sitio) | 6 | 245.8475 | 10.640192 | 0.0029953 | 0.9959507 |
| 15 | p(elev)psi(Sitio) | 6 | 246.7894 | 11.582055 | 0.0018703 | 0.9978210 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 246.9719 | 11.764607 | 0.0017071 | 0.9995281 |
| 8 | p(.)psi(Sitio) | 5 | 249.5438 | 14.336433 | 0.0004719 | 1.0000000 |
Sciurus igniventris
[1] “Sciurus igniventris”
sp25 <- f.sp.occu.models(sp_number = 25)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp25) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Sciurus igniventris models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 10 | p(elev)psi(slope) | 4 | 120.9315 | 0.0000000 | 0.2626535 | 0.2626535 |
| 11 | p(elev)psi(aspect) | 4 | 121.6801 | 0.7485681 | 0.1806482 | 0.4433017 |
| 12 | p(elev)psi(roughness) | 4 | 121.9148 | 0.9832995 | 0.1606432 | 0.6039449 |
| 13 | p(elev)psi(dist_def) | 4 | 121.9434 | 1.0118615 | 0.1583654 | 0.7623102 |
| 9 | p(elev)psi(elev) | 4 | 122.0963 | 1.1648083 | 0.1467061 | 0.9090164 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 123.8451 | 2.9135845 | 0.0611936 | 0.9702100 |
| 15 | p(elev)psi(Sitio) | 6 | 125.3288 | 4.3972782 | 0.0291425 | 0.9993525 |
| 3 | p(.)psi(slope) | 3 | 136.3598 | 15.4282723 | 0.0001173 | 0.9994697 |
| 6 | p(.)psi(dist_def) | 3 | 137.1316 | 16.2001072 | 0.0000797 | 0.9995495 |
| 1 | p(.)psi(.) | 2 | 137.1604 | 16.2288574 | 0.0000786 | 0.9996280 |
| 2 | p(.)psi(elev) | 3 | 137.7990 | 16.8675003 | 0.0000571 | 0.9996851 |
| 5 | p(.)psi(roughness) | 3 | 137.8121 | 16.8805575 | 0.0000567 | 0.9997419 |
| 17 | p(roughness)psi(slope) | 4 | 138.0753 | 17.1438325 | 0.0000497 | 0.9997916 |
| 4 | p(.)psi(aspect) | 3 | 138.2663 | 17.3347854 | 0.0000452 | 0.9998368 |
| 20 | p(roughness)psi(dist_def) | 4 | 138.6517 | 17.7201550 | 0.0000373 | 0.9998741 |
| 16 | p(roughness)psi(elev) | 4 | 139.2664 | 18.3349453 | 0.0000274 | 0.9999015 |
| 19 | p(roughness)psi(roughness) | 4 | 139.4304 | 18.4989160 | 0.0000253 | 0.9999268 |
| 18 | p(roughness)psi(aspect) | 4 | 139.6136 | 18.6820604 | 0.0000230 | 0.9999498 |
| 8 | p(.)psi(Sitio) | 5 | 139.9613 | 19.0297810 | 0.0000194 | 0.9999692 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 140.5965 | 19.6649565 | 0.0000141 | 0.9999833 |
| 22 | p(roughness)psi(Sitio) | 6 | 141.4885 | 20.5570286 | 0.0000090 | 0.9999923 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 141.8098 | 20.8782692 | 0.0000077 | 1.0000000 |
Sciurus igniventris
[1] “Puma yagouaroundi”
sp26 <- f.sp.occu.models(sp_number = 26)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp26) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Puma yagouaroundi models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 4 | p(.)psi(aspect) | 3 | 123.7794 | 0.0000000 | 0.1991217 | 0.1991217 |
| 18 | p(roughness)psi(aspect) | 4 | 124.5855 | 0.8060798 | 0.1330702 | 0.3321919 |
| 1 | p(.)psi(.) | 2 | 125.1225 | 1.3431325 | 0.1017328 | 0.4339247 |
| 11 | p(elev)psi(aspect) | 4 | 125.4529 | 1.6734863 | 0.0862434 | 0.5201681 |
| 6 | p(.)psi(dist_def) | 3 | 125.8869 | 2.1074837 | 0.0694200 | 0.5895880 |
| 20 | p(roughness)psi(dist_def) | 4 | 126.7782 | 2.9988176 | 0.0444563 | 0.6340444 |
| 5 | p(.)psi(roughness) | 3 | 126.8357 | 3.0562761 | 0.0431973 | 0.6772417 |
| 2 | p(.)psi(elev) | 3 | 126.8947 | 3.1153500 | 0.0419401 | 0.7191818 |
| 3 | p(.)psi(slope) | 3 | 127.0675 | 3.2881171 | 0.0384692 | 0.7576509 |
| 13 | p(elev)psi(dist_def) | 4 | 127.2646 | 3.4852237 | 0.0348588 | 0.7925097 |
| 19 | p(roughness)psi(roughness) | 4 | 127.4139 | 3.6345238 | 0.0323513 | 0.8248610 |
| 16 | p(roughness)psi(elev) | 4 | 128.0326 | 4.2531792 | 0.0237439 | 0.8486049 |
| 17 | p(roughness)psi(slope) | 4 | 128.0732 | 4.2938124 | 0.0232664 | 0.8718713 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 128.0993 | 4.3199024 | 0.0229649 | 0.8948362 |
| 9 | p(elev)psi(elev) | 4 | 128.3501 | 4.5707178 | 0.0202582 | 0.9150944 |
| 12 | p(elev)psi(roughness) | 4 | 128.4948 | 4.7154605 | 0.0188438 | 0.9339382 |
| 10 | p(elev)psi(slope) | 4 | 128.7925 | 5.0131014 | 0.0162382 | 0.9501764 |
| 8 | p(.)psi(Sitio) | 5 | 128.9100 | 5.1306527 | 0.0153113 | 0.9654877 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 129.4781 | 5.6987479 | 0.0115253 | 0.9770129 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 129.8330 | 6.0535728 | 0.0096517 | 0.9866646 |
| 22 | p(roughness)psi(Sitio) | 6 | 130.4683 | 6.6889424 | 0.0070248 | 0.9936894 |
| 15 | p(elev)psi(Sitio) | 6 | 130.6827 | 6.9033656 | 0.0063106 | 1.0000000 |
[1] “Philander opossum”
sp29 <- f.sp.occu.models(sp_number = 29)
# xtable::xtable(sp1, "html") #, format = "rst")
# kable(Table1, "latex", booktabs = T, format = "rst") # para pdf
kable(sp29) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", font_size = 8))| Philander opossum models | nPars | AIC | delta | AICwt | cumltvWt | |
|---|---|---|---|---|---|---|
| 5 | p(.)psi(roughness) | 3 | 68.62094 | 0.0000000 | 0.2160118 | 0.2160118 |
| 12 | p(elev)psi(roughness) | 4 | 69.42803 | 0.8070833 | 0.1442851 | 0.3602970 |
| 19 | p(roughness)psi(roughness) | 4 | 69.55897 | 0.9380251 | 0.1351413 | 0.4954382 |
| 3 | p(.)psi(slope) | 3 | 70.00266 | 1.3817147 | 0.1082535 | 0.6036917 |
| 17 | p(roughness)psi(slope) | 4 | 70.75891 | 2.1379642 | 0.0741694 | 0.6778611 |
| 10 | p(elev)psi(slope) | 4 | 70.89312 | 2.2721740 | 0.0693555 | 0.7472166 |
| 16 | p(roughness)psi(elev) | 4 | 72.64519 | 4.0242448 | 0.0288818 | 0.7760984 |
| 21 | p(roughness)psi(COB_ACTUAL) | 5 | 72.69670 | 4.0757583 | 0.0281474 | 0.8042458 |
| 22 | p(roughness)psi(Sitio) | 6 | 72.95550 | 4.3345531 | 0.0247310 | 0.8289767 |
| 2 | p(.)psi(elev) | 3 | 73.10123 | 4.4802908 | 0.0229930 | 0.8519697 |
| 8 | p(.)psi(Sitio) | 5 | 73.12861 | 4.5076649 | 0.0226804 | 0.8746501 |
| 9 | p(elev)psi(elev) | 4 | 73.18356 | 4.5626170 | 0.0220657 | 0.8967158 |
| 18 | p(roughness)psi(aspect) | 4 | 73.64148 | 5.0205382 | 0.0175502 | 0.9142660 |
| 20 | p(roughness)psi(dist_def) | 4 | 73.65209 | 5.0311445 | 0.0174574 | 0.9317233 |
| 15 | p(elev)psi(Sitio) | 6 | 73.69048 | 5.0695365 | 0.0171254 | 0.9488488 |
| 1 | p(.)psi(.) | 2 | 74.46489 | 5.8439448 | 0.0116274 | 0.9604761 |
| 6 | p(.)psi(dist_def) | 3 | 74.77331 | 6.1523682 | 0.0099657 | 0.9704418 |
| 7 | p(.)psi(COB_ACTUAL) | 4 | 75.43463 | 6.8136863 | 0.0071599 | 0.9776017 |
| 4 | p(.)psi(aspect) | 3 | 75.44331 | 6.8223623 | 0.0071289 | 0.9847305 |
| 13 | p(elev)psi(dist_def) | 4 | 75.59156 | 6.9706178 | 0.0066195 | 0.9913501 |
| 11 | p(elev)psi(aspect) | 4 | 76.43278 | 7.8118403 | 0.0043467 | 0.9956967 |
| 14 | p(elev)psi(COB_ACTUAL) | 5 | 76.45286 | 7.8319212 | 0.0043033 | 1.0000000 |
## R version 3.6.1 (2019-07-05)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 14393)
##
## Matrix products: default
##
## attached base packages:
## [1] parallel grid stats graphics grDevices utils datasets
## [8] methods base
##
## other attached packages:
## [1] unmarked_0.13-1 Rcpp_1.0.3 rstan_2.19.3
## [4] StanHeaders_2.21.0-1 OpenStreetMap_0.3.4 osmdata_0.1.3
## [7] tmaptools_2.0-2 tmap_2.3-2 stargazer_5.2.2
## [10] kableExtra_1.1.0 knitr_1.28 forcats_0.4.0
## [13] dplyr_0.8.4 purrr_0.3.3 readr_1.3.1
## [16] tidyr_1.0.2 tibble_2.1.3 tidyverse_1.3.0
## [19] readxl_1.3.1 raster_3.0-12 spatstat_1.63-0
## [22] rpart_4.1-15 nlme_3.1-144 spatstat.data_1.4-3
## [25] mapview_2.7.0 sf_0.8-1 maptools_0.9-9
## [28] rgdal_1.4-8 sp_1.4-0 stringr_1.4.0
## [31] lubridate_1.7.4 scales_1.1.0 plyr_1.8.5
## [34] reshape2_1.4.3 Hmisc_4.3-1 Formula_1.2-3
## [37] survival_3.1-8 lattice_0.20-38 xtable_1.8-4
## [40] ggmap_3.0.0 chron_2.3-55 ggplot2_3.2.1
## [43] zoo_1.8-7 reshape_0.8.8
##
## loaded via a namespace (and not attached):
## [1] backports_1.1.5 lwgeom_0.2-1 lazyeval_0.2.2
## [4] splines_3.6.1 crosstalk_1.0.0 leaflet_2.0.3
## [7] inline_0.3.15 digest_0.6.24 htmltools_0.4.0
## [10] fansi_0.4.1 magrittr_1.5 checkmate_2.0.0
## [13] tensor_1.5 cluster_2.1.0 modelr_0.1.5
## [16] matrixStats_0.55.0 prettyunits_1.1.1 jpeg_0.1-8.1
## [19] colorspace_1.4-1 rvest_0.3.5 haven_2.2.0
## [22] xfun_0.12 callr_3.4.2 crayon_1.3.4
## [25] jsonlite_1.6.1 glue_1.3.1 polyclip_1.10-0
## [28] gtable_0.3.0 webshot_0.5.2 pkgbuild_1.0.6
## [31] abind_1.4-5 DBI_1.1.0 viridisLite_0.3.0
## [34] htmlTable_1.13.3 units_0.6-5 foreign_0.8-75
## [37] stats4_3.6.1 htmlwidgets_1.5.1 httr_1.4.1
## [40] RColorBrewer_1.1-2 acepack_1.4.1 loo_2.2.0
## [43] pkgconfig_2.0.3 XML_3.99-0.3 rJava_0.9-11
## [46] farver_2.0.3 nnet_7.3-12 dbplyr_1.4.2
## [49] deldir_0.1-25 tidyselect_1.0.0 labeling_0.3
## [52] rlang_0.4.4 later_1.0.0 munsell_0.5.0
## [55] cellranger_1.1.0 tools_3.6.1 cli_2.0.1
## [58] generics_0.0.2 broom_0.5.4 evaluate_0.14
## [61] fastmap_1.0.1 yaml_2.2.1 goftest_1.2-2
## [64] processx_3.4.2 leafsync_0.1.0 fs_1.3.1
## [67] satellite_1.0.2 RgoogleMaps_1.4.5.3 mime_0.9
## [70] xml2_1.2.2 compiler_3.6.1 rstudioapi_0.11
## [73] curl_4.3 png_0.1-7 e1071_1.7-3
## [76] spatstat.utils_1.17-0 reprex_0.3.0 stringi_1.4.6
## [79] ps_1.3.2 rgeos_0.5-2 Matrix_1.2-18
## [82] classInt_0.4-2 vctrs_0.2.2 pillar_1.4.3
## [85] lifecycle_0.1.0 data.table_1.12.8 bitops_1.0-6
## [88] httpuv_1.5.2 R6_2.4.1 latticeExtra_0.6-29
## [91] promises_1.1.0 KernSmooth_2.23-16 gridExtra_2.3
## [94] codetools_0.2-16 dichromat_2.0-0 MASS_7.3-51.5
## [97] assertthat_0.2.1 rjson_0.2.20 withr_2.1.2
## [100] mgcv_1.8-31 hms_0.5.3 class_7.3-15
## [103] rmarkdown_2.1 shiny_1.4.0 base64enc_0.1-3