Install necessary packages and import appropriate data
pacman::p_load(tidyverse, readxl, raster, vegan, tigris, sf, sjPlot, sp, spOccupancy, ggrepel, lme4, lmerTest, MuMIn, brms, MCMCvis)
# Tree PCQ Data
tree_data <- read_excel("C:/Users/DrewIvory/OneDrive - University of Florida/Desktop/School/PHD/01_Projects/05_SharedData/Field_Data_FL_AL_MS.xlsx",
sheet = "Tree_PCQ")
# Soil Data
fuel_data <- read_excel("C:/Users/DrewIvory/OneDrive - University of Florida/Desktop/School/PHD/01_Projects/05_SharedData/Field_Data_FL_AL_MS.xlsx",
sheet = "Fuel_Sampling")
# Veg Data
Veg_Cover <- read_excel("C:/Users/DrewIvory/OneDrive - University of Florida/Desktop/School/PHD/01_Projects/05_SharedData/Field_Data_FL_AL_MS.xlsx",
sheet = "Veg_Cover")
# Shrub Cover Data
shrub_data <- read_excel("C:/Users/DrewIvory/OneDrive - University of Florida/Desktop/School/PHD/01_Projects/05_SharedData/Field_Data_FL_AL_MS.xlsx",
sheet = "Shrub_Cover")
# Site Data
CameraData <- read_excel("C:/Users/DrewIvory/OneDrive - University of Florida/Desktop/School/PHD/01_Projects/04_Wildlife/02_Data/CameraData.xlsx")
CameraLoc <- read_excel("C:/Users/DrewIvory/OneDrive - University of Florida/Desktop/School/PHD/01_Projects/04_Wildlife/02_Data/CameraLoc.xlsx",
sheet = "CameraLocations")
# Add effort data
effort_matrix <- read_excel("C:/Users/DrewIvory/OneDrive - University of Florida/Desktop/School/PHD/01_Projects/04_Wildlife/02_Data/CameraLoc.xlsx",
sheet = "Effort_Matrix_Full") %>%
pivot_longer(cols = matches("^202[4-5]-"), names_to = "week", values_to = "days") %>%
filter(days == "7") %>%
dplyr::select(Plot, week)
I moved this from a later section because the filtering process removed quadrats that did not capture any species. Rows labeled as “None” were removed, suggesting that the number of quadrats sampled per plot is not consistent across all plots.
# Count the total number of quadrats per plot
quadrat_count <- Veg_Cover %>%
group_by(Plot) %>%
summarize(total_quadrats = n_distinct(Quadrat), .groups = "drop")
#Filter tree data to only include trees with "tree" in the growth column
tree_data <- dplyr::filter(tree_data, Growth == "Tree")
#Filter Veg Cover to exclude Shrubs and Trees
Veg_Cover <- dplyr::filter(Veg_Cover, Growth != "Shrub" & Growth != "Tree")
#Filter Shrub Cover to only include Shrubs and Trees
shrub_data <- dplyr::filter(shrub_data, Growth == "Shrub" | Growth == "Tree")
This is not needed for non-ordination analysis. Moving the threshold down to 0% to keep the option, but to ensure it has no effect for now.
# Calculate the total number of sites
total_sites <- nrow(CameraLoc)
# Function to filter data by frequency
filter_by_frequency <- function(df) {
# Group data by species and calculate the frequency
freq <- df %>%
group_by(Species) %>%
summarise(Frequency = n_distinct(Plot) / nrow(CameraLoc) * 100) %>%
filter(Frequency >= 0)
# Filter the original data to include only species with frequency >= 3%
filtered_df <- df %>%
filter(Species %in% freq$Species)
return(filtered_df)
}
# Filter tree data by frequency
tree_data <- filter_by_frequency(tree_data)
# Filter Veg Cover data by frequency
Veg_Cover <- filter_by_frequency(Veg_Cover)
# Filter Shrub Cover data by frequency
shrub_data <- filter_by_frequency(shrub_data)
# Total length of Shrub cover at a site
shrub_cover <- shrub_data %>%
mutate(Cover = Line_End - Line_Start) %>%
group_by(Species_Name, Plot) %>%
summarise(Shrub_Total_Cover = sum(Cover, na.rm = TRUE), .groups = "drop") %>%
mutate(Shrub_Percent_Cover = Shrub_Total_Cover / 3000 * 100)
# Summed length of shrub over at a site
shrub_cover_summed <- shrub_cover %>%
group_by(Plot) %>%
summarize(total_shrub_cover = sum(Shrub_Total_Cover, na.rm = TRUE), .groups = "drop")
# Combine Plot and Quadrat columns
Veg_Cover <- Veg_Cover %>%
mutate(Plot_Quadrat = paste(Plot, Quadrat, sep = '_'))
# Join with CogonSites to get site information
Veg_Cover <- Veg_Cover %>%
left_join(CameraLoc, by = "Plot")
# Sum species cover across quadrats for each species at each plot
veg_cover_summed <- Veg_Cover %>%
group_by(Plot, Species_Name) %>%
summarize(total_cover = sum(Cover_Per, na.rm = TRUE), .groups = "drop")
# Calculate average herbaceous species cover
avg_species_cover <- veg_cover_summed %>%
left_join(quadrat_count, by = "Plot") %>%
mutate(avg_cover = total_cover / total_quadrats)
This species matrix includes herbaceous and shrub species
# Merge shrub cover with herbaceous average cover
combined_cover <- avg_species_cover %>%
full_join(
shrub_cover %>%
dplyr::select(Plot, Species_Name, Shrub_Percent_Cover),
by = c("Plot", "Species_Name")
) %>%
mutate(
overlap_flag = ifelse(!is.na(avg_cover) & !is.na(Shrub_Percent_Cover), TRUE, FALSE), # Flag overlaps
final_cover = case_when(
!is.na(avg_cover) & is.na(Shrub_Percent_Cover) ~ avg_cover, # Use herbaceous cover if no shrub data
is.na(avg_cover) & !is.na(Shrub_Percent_Cover) ~ Shrub_Percent_Cover, # Use shrub cover if no herbaceous data
TRUE ~ NA_real_ # Leave as NA where overlaps exist
)
)
# Species Matrix
species_matrix <- combined_cover %>%
dplyr::select(Plot, Species_Name, final_cover) %>%
pivot_wider(
names_from = Species_Name,
values_from = final_cover,
values_fill = 0
)
avg_cogongrass_cover <- species_matrix %>%
group_by(Plot) %>%
summarize(Avg_Cogongrass_Cover = sum(Imperata_cylindrica, na.rm = TRUE) / n(), .groups = "drop")
# Summarize species cover by site
site_species_cover <- Veg_Cover %>%
group_by(Plot, Species_Name) %>%
summarize(total_cover = sum(Cover_Per, na.rm = TRUE)) %>%
ungroup()
## `summarise()` has grouped output by 'Plot'. You can override using the
## `.groups` argument.
## Remove all Imperata_cylindrica_Live and Imperata_cylindrica from species
site_species_cover <- site_species_cover %>%
filter(Species_Name != "Imperata_cylindrica_Live" & Species_Name != "Imperata_cylindrica")
# Calculate Shannon diversity per site
Veg_shannon_diversity <- site_species_cover %>%
group_by(Plot) %>%
mutate(proportion = total_cover / sum(total_cover)) %>%
summarize(Veg_shannon_index = -sum(proportion * log(proportion), na.rm = TRUE))
print(Veg_shannon_diversity)
## # A tibble: 206 × 2
## Plot Veg_shannon_index
## <chr> <dbl>
## 1 BI200 2.75
## 2 BI201 2.70
## 3 BI202 2.59
## 4 BI97 1.61
## 5 BI99 2.97
## 6 BN210 2.97
## 7 BN211 2.43
## 8 BN212 2.22
## 9 BN96 3.05
## 10 BN98 2.79
## # ℹ 196 more rows
if (!is.numeric(fuel_data$Height)) {
fuel_data$Height <- as.numeric(as.character(fuel_data$Height))
}
## Warning: NAs introduced by coercion
# Calculate average vegetation height per plot
veg_height <- fuel_data %>%
group_by(Plot) %>%
summarize(avg_veg_height = mean(Height, na.rm = TRUE), .groups = "drop")
# Tree density from point-centered quarter data
if (!is.numeric(tree_data$Distance)) {
tree_data$Distance <- as.numeric(as.character(tree_data$Distance))
}
tree_density_data <- tree_data %>%
group_by(Plot) %>%
summarize(Average_Distance = mean(Distance) / 100, # Convert to meters
Tree_Density = 10000 / (Average_Distance^2)) # Convert to trees per hectare
# Average canopy cover from vegetation quadrats
tree_canopy_data <- Veg_Cover %>%
distinct(Plot, Quadrat, .keep_all = TRUE) %>% # Ensure each quadrat counts once per plot
group_by(Plot) %>%
summarize(Avg_Canopy_Cover = mean(Canopy_Cover, na.rm = TRUE), .groups = "drop") # Calculate the average canopy cover per plot
cor(tree_density_data$Tree_Density, tree_canopy_data$Avg_Canopy_Cover)
## [1] 0.2742307
CameraLoc <- CameraLoc %>%
left_join(Veg_shannon_diversity, by = "Plot") %>%
left_join(avg_cogongrass_cover, by = "Plot") %>%
left_join(shrub_cover_summed %>% dplyr::select(Plot, total_shrub_cover), by = "Plot") %>%
left_join(veg_height, by = "Plot") %>%
left_join(tree_density_data %>% dplyr::select(Plot, Tree_Density), by = "Plot") %>%
left_join(tree_canopy_data %>% dplyr::select(Plot, Avg_Canopy_Cover), by = "Plot") %>%
dplyr::select(-Authority)
# Group by Name and count the number of observations
species_counts <- CameraData %>%
filter((Class == "Mammalia" & Name != "Odocoileus_virginianus") | Name == "Meleagris_gallopavo") %>%
group_by(Name) %>%
summarize(count = n(), .groups = "drop")
# Filter for species with count greater than 10
species_subset <- species_counts %>%
filter(count > 10) %>%
pull(Name)
# Filter CameraData to only include species with count > 10
CameraData <- CameraData %>%
filter(Name %in% species_subset)
# Format Data Weekly
observations_weekly <- CameraData %>%
group_by(Plot, week = format(as.Date(Date), "%Y-%U"), Name) %>%
summarise(observations = n(), .groups = 'drop')
# Merge with Effort Matrix to include only valid weeks
observations_weekly <- effort_matrix %>%
left_join(observations_weekly, by = c("Plot" = "Plot", "week")) %>%
replace_na(list(observations = 0))
# Convert to wide format
observations_species <- observations_weekly %>%
pivot_wider(names_from = Name, values_from = observations, values_fill = list(observations = 0)) %>%
dplyr::select(-"NA")
# Create detection array
site_names <- sort(unique(observations_species$Plot))
species_names <- setdiff(colnames(observations_species), c("Plot", "week"))
num_sites <- length(site_names)
num_weeks <- length(unique(observations_species$week))
num_species <- length(species_names)
detection_array <- array(0, dim = c(num_sites, num_weeks, num_species))
dimnames(detection_array) <- list(site_names, unique(observations_species$week), species_names)
for (s in seq_along(species_names)) {
species_col <- species_names[s]
for (i in seq_along(site_names)) {
site <- site_names[i]
for (j in seq_along(unique(observations_species$week))) {
week <- unique(observations_species$week)[j]
detection_array[i, j, s] <- ifelse(
any(observations_species$Plot == site & observations_species$week == week & observations_species[[species_col]] > 0),
1, 0
)
}
}
}
dim(detection_array) # Should be num_sites x num_weeks x num_species
## [1] 32 36 8
# Duplicate CameraLoc to be used in Objective 2
CameraLoc_O2 <- CameraLoc
# Standardize the covariates
CameraLoc <- CameraLoc %>%
dplyr::select(-Plot, -Camera, -Lat, -Long, -Status, - Start_Date)
covariates_matrix <- as.matrix(CameraLoc)
rownames(covariates_matrix) <- site_names
# Standardizing covariates
covariates_matrix <- scale(covariates_matrix)
# Create week matrix for covariate structure [site x week]
week_vals <- unique(observations_species$week)
week_matrix <- matrix(rep(week_vals, each = num_sites), nrow = num_sites, ncol = num_weeks, byrow = FALSE)
# Create detection covariate list
det.covs <- list(
shrub_cover = covariates_matrix[, "total_shrub_cover"],
veg_height = covariates_matrix[, "avg_veg_height"],
week = week_matrix
)
# Remove dash and convert to numeric
week_numeric <- as.numeric(gsub("-", "", det.covs$week))
## Scale and center week_numeric
week_numeric <- scale(week_numeric)
# Reshape into the original 32x36 matrix
det.covs$week <- matrix(week_numeric, nrow = 32, ncol = 36)
str(det.covs)
## List of 3
## $ shrub_cover: Named num [1:32] 1.526 0.5 -0.153 -1.003 -0.811 ...
## ..- attr(*, "names")= chr [1:32] "BI201" "BN211" "EI100" "EI102" ...
## $ veg_height : Named num [1:32] 0.466 -1.044 1.181 0.879 1.684 ...
## ..- attr(*, "names")= chr [1:32] "BI201" "BN211" "EI100" "EI102" ...
## $ week : num [1:32, 1:36] -0.613 -0.613 -0.613 -0.613 -0.613 ...
This requires combining the presence data and the site covariate data into a single list. This also means that the presence data is in a 3-d format.
# Combine into a named list
data_list <- list(
y = detection_array,
occ.covs = covariates_matrix,
det.covs = det.covs
)
str(data_list)
## List of 3
## $ y : num [1:32, 1:36, 1:8] 0 0 0 0 0 0 0 0 0 0 ...
## ..- attr(*, "dimnames")=List of 3
## .. ..$ : chr [1:32] "BI201" "BN211" "EI100" "EI102" ...
## .. ..$ : chr [1:36] "2024-29" "2024-30" "2024-31" "2024-32" ...
## .. ..$ : chr [1:8] "Canis_latrans" "Procyon_lotor" "Dasypus_novemcinctus" "Lynx_rufus" ...
## $ occ.covs: num [1:32, 1:11] -0.237 -0.446 -0.337 -0.308 0.039 ...
## ..- attr(*, "dimnames")=List of 2
## .. ..$ : chr [1:32] "BI201" "BN211" "EI100" "EI102" ...
## .. ..$ : chr [1:11] "Cogon_Patch_Size" "VegetationDiversity" "PostTreatmentDensities" "Auth" ...
## ..- attr(*, "scaled:center")= Named num [1:11] 458.388 21.875 0.898 2.844 16.188 ...
## .. ..- attr(*, "names")= chr [1:11] "Cogon_Patch_Size" "VegetationDiversity" "PostTreatmentDensities" "Auth" ...
## ..- attr(*, "scaled:scale")= Named num [1:11] 1027.633 6.871 1.232 0.808 0.397 ...
## .. ..- attr(*, "names")= chr [1:11] "Cogon_Patch_Size" "VegetationDiversity" "PostTreatmentDensities" "Auth" ...
## $ det.covs:List of 3
## ..$ shrub_cover: Named num [1:32] 1.526 0.5 -0.153 -1.003 -0.811 ...
## .. ..- attr(*, "names")= chr [1:32] "BI201" "BN211" "EI100" "EI102" ...
## ..$ veg_height : Named num [1:32] 0.466 -1.044 1.181 0.879 1.684 ...
## .. ..- attr(*, "names")= chr [1:32] "BI201" "BN211" "EI100" "EI102" ...
## ..$ week : num [1:32, 1:36] -0.613 -0.613 -0.613 -0.613 -0.613 ...
I am unsure why I only had an issue with total shrub cover, but this should fix the “cannot find” issue.
# Convert occupancy and detection covariates to a dataframe
data_list[["occ.covs"]] <- as.data.frame(data_list[["occ.covs"]])
data_list[["occ.covs"]]$total_shrub_cover <- as.numeric(data_list[["occ.covs"]]$total_shrub_cover)
#data_list[["det.covs"]] <- as.data.frame(data_list[["det.covs"]])
#data_list[["det.covs"]]$total_shrub_cover <- as.numeric(data_list[["det.covs"]]$total_shrub_cover)
# Make species the first dimension
data_list$y <- aperm(data_list$y, c(3, 1, 2))
dimnames(data_list$y) <- list(species = dimnames(data_list$y)[[1]],
site = dimnames(data_list$y)[[2]],
week = dimnames(data_list$y)[[3]])
str(data_list)
## List of 3
## $ y : num [1:8, 1:32, 1:36] 0 0 0 0 0 0 0 0 0 0 ...
## ..- attr(*, "dimnames")=List of 3
## .. ..$ species: chr [1:8] "Canis_latrans" "Procyon_lotor" "Dasypus_novemcinctus" "Lynx_rufus" ...
## .. ..$ site : chr [1:32] "BI201" "BN211" "EI100" "EI102" ...
## .. ..$ week : chr [1:36] "2024-29" "2024-30" "2024-31" "2024-32" ...
## $ occ.covs:'data.frame': 32 obs. of 11 variables:
## ..$ Cogon_Patch_Size : num [1:32] -0.237 -0.446 -0.337 -0.308 0.039 ...
## ..$ VegetationDiversity : num [1:32] -0.273 0.455 1.619 -0.273 2.929 ...
## ..$ PostTreatmentDensities: num [1:32] 0.432 -0.729 0.432 2.169 1.13 ...
## ..$ Auth : num [1:32] -2.28 -2.28 -1.04 -1.04 -1.04 ...
## ..$ UTM_Zone : num [1:32] -0.473 -0.473 -0.473 -0.473 -0.473 ...
## ..$ Veg_shannon_index : num [1:32] 0.6829 0.0427 0.7279 -0.5991 1.1371 ...
## ..$ Avg_Cogongrass_Cover : num [1:32] -0.154 -0.708 0.308 2.045 1.121 ...
## ..$ total_shrub_cover : num [1:32] 1.526 0.5 -0.153 -1.003 -0.811 ...
## ..$ avg_veg_height : num [1:32] 0.466 -1.044 1.181 0.879 1.684 ...
## ..$ Tree_Density : num [1:32] -0.3629 -0.3564 -0.5111 3.5896 0.0958 ...
## ..$ Avg_Canopy_Cover : num [1:32] 0.1362 -0.0252 -0.9132 0.782 -1.9627 ...
## $ det.covs:List of 3
## ..$ shrub_cover: Named num [1:32] 1.526 0.5 -0.153 -1.003 -0.811 ...
## .. ..- attr(*, "names")= chr [1:32] "BI201" "BN211" "EI100" "EI102" ...
## ..$ veg_height : Named num [1:32] 0.466 -1.044 1.181 0.879 1.684 ...
## .. ..- attr(*, "names")= chr [1:32] "BI201" "BN211" "EI100" "EI102" ...
## ..$ week : num [1:32, 1:36] -0.613 -0.613 -0.613 -0.613 -0.613 ...
# Define detection formulas
det.null <- ~ 1
det.full <- ~ shrub_cover + veg_height + week
det.cover <- ~ shrub_cover + veg_height
det.week <- ~ week
det.week.quad <- ~ week + I(week^2)
det.full.quad <- ~ shrub_cover + veg_height + week + I(week^2)
# Define occupancy formulas
occ.null <- ~ 1
occ.full <- ~ Cogon_Patch_Size + Veg_shannon_index + total_shrub_cover + Avg_Cogongrass_Cover +
Tree_Density + Avg_Canopy_Cover + avg_veg_height + (1 | Auth)
occ.full.quad <- ~ Cogon_Patch_Size + Veg_shannon_index + total_shrub_cover + Avg_Cogongrass_Cover +
Tree_Density + Avg_Canopy_Cover + I(Avg_Cogongrass_Cover^2) + avg_veg_height + (1 | Auth)
occ.cover <- ~ Avg_Cogongrass_Cover + total_shrub_cover + avg_veg_height + (1 | Auth)
occ.canopy <- ~ Tree_Density + Avg_Canopy_Cover + (1 | Auth)
occ.move <- ~ Cogon_Patch_Size + Avg_Cogongrass_Cover + total_shrub_cover + (1 | Auth)
occ.forage <- ~ Veg_shannon_index + Avg_Cogongrass_Cover + (1 | Auth)
occ.cogon <- ~ Avg_Cogongrass_Cover + (1 | Auth)
occ.cogon.quad <- ~ Avg_Cogongrass_Cover + I(Avg_Cogongrass_Cover^2) + (1 | Auth)
ms_null_null <- msPGOcc(
occ.formula = occ.null,
det.formula = det.null,
data = data_list,
n.samples = 5000, # number of MCMC samples
n.thin = 2, # thinning parameter for the MCMC chain
n.burn = 3000, # burn-in period for the sampler
n.chains = 3, # number of MCMC chains
n.report = 500, # reporting interval for the sampler
)
## ----------------------------------------
## Preparing to run the model
## ----------------------------------------
## No prior specified for beta.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for alpha.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for tau.sq.beta.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for tau.sq.alpha.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## z is not specified in initial values.
## Setting initial values based on observed data
## beta.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## alpha.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## tau.sq.beta is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## tau.sq.alpha is not specified in initial values.
## Setting to initial values to random values between 0.5 and 10
## beta is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## alpha is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## ----------------------------------------
## Model description
## ----------------------------------------
## Multi-species Occupancy Model with Polya-Gamma latent
## variable fit with 32 sites and 8 species.
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## Source compiled with OpenMP support and model fit using 1 thread(s).
##
## ----------------------------------------
## Chain 1
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 2
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 3
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
summary(ms_null_null)
##
## Call:
## msPGOcc(occ.formula = occ.null, det.formula = det.null, data = data_list,
## n.samples = 5000, n.report = 500, n.burn = 3000, n.thin = 2,
## n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.4992
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -0.4016 0.3293 -1.0435 -0.4047 0.25 1.0035 2155
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.6637 0.7363 0.0982 0.4853 2.2666 1.03 1928
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.556 0.282 -3.1063 -2.5603 -1.9589 1.0004 2665
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.5808 0.4987 0.1525 0.4473 1.7952 1.0027 1995
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans 0.1239 0.3688 -0.5623 0.1127 0.8871 1.0064
## (Intercept)-Procyon_lotor 0.4617 0.3823 -0.2548 0.4592 1.2332 1.0016
## (Intercept)-Dasypus_novemcinctus -0.6012 0.3306 -1.2785 -0.5930 0.0563 1.0007
## (Intercept)-Lynx_rufus -0.1379 0.4907 -0.9658 -0.1824 1.0020 1.0139
## (Intercept)-Didelphis_virginiana -1.1263 0.4043 -1.9774 -1.1042 -0.3938 1.0046
## (Intercept)-Sylvilagus_floridanus -0.4051 0.4065 -1.1742 -0.4189 0.4148 1.0038
## (Intercept)-Meleagris_gallopavo -0.4082 0.4488 -1.2436 -0.4286 0.5483 1.0096
## (Intercept)-Sciurus_carolinensis -1.0979 0.4070 -1.9691 -1.0809 -0.3403 1.0028
## ESS
## (Intercept)-Canis_latrans 2213
## (Intercept)-Procyon_lotor 1878
## (Intercept)-Dasypus_novemcinctus 3000
## (Intercept)-Lynx_rufus 778
## (Intercept)-Didelphis_virginiana 1971
## (Intercept)-Sylvilagus_floridanus 1738
## (Intercept)-Meleagris_gallopavo 902
## (Intercept)-Sciurus_carolinensis 2035
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.5945 0.1675 -2.9436 -2.5922 -2.2902 1.0305
## (Intercept)-Procyon_lotor -2.2663 0.1272 -2.5235 -2.2635 -2.0303 1.0119
## (Intercept)-Dasypus_novemcinctus -1.6092 0.1343 -1.8843 -1.6075 -1.3588 1.0025
## (Intercept)-Lynx_rufus -3.3634 0.2927 -3.9828 -3.3450 -2.8395 1.0416
## (Intercept)-Didelphis_virginiana -2.3384 0.2471 -2.8544 -2.3300 -1.8808 1.0042
## (Intercept)-Sylvilagus_floridanus -3.0894 0.2728 -3.6399 -3.0807 -2.5769 1.0013
## (Intercept)-Meleagris_gallopavo -3.2835 0.3139 -3.9413 -3.2614 -2.7126 1.0055
## (Intercept)-Sciurus_carolinensis -2.4757 0.2636 -3.0427 -2.4642 -2.0088 1.0010
## ESS
## (Intercept)-Canis_latrans 1041
## (Intercept)-Procyon_lotor 1539
## (Intercept)-Dasypus_novemcinctus 2502
## (Intercept)-Lynx_rufus 462
## (Intercept)-Didelphis_virginiana 1322
## (Intercept)-Sylvilagus_floridanus 616
## (Intercept)-Meleagris_gallopavo 503
## (Intercept)-Sciurus_carolinensis 1145
# Includes all covariates of detection and occupancy
ms_full_full <- msPGOcc(
occ.formula = occ.full,
det.formula = det.full,
data = data_list,
n.samples = 5000,
n.thin = 2,
n.burn = 3000,
n.chains = 3,
n.report = 500,
)
## ----------------------------------------
## Preparing to run the model
## ----------------------------------------
## Warning in (function (..., row.names = NULL, check.rows = FALSE, check.names =
## TRUE, : row names were found from a short variable and have been discarded
## No prior specified for beta.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for alpha.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for tau.sq.beta.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for tau.sq.alpha.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for sigma.sq.psi.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## z is not specified in initial values.
## Setting initial values based on observed data
## beta.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## alpha.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## tau.sq.beta is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## tau.sq.alpha is not specified in initial values.
## Setting to initial values to random values between 0.5 and 10
## beta is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## alpha is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## sigma.sq.psi is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## ----------------------------------------
## Model description
## ----------------------------------------
## Multi-species Occupancy Model with Polya-Gamma latent
## variable fit with 32 sites and 8 species.
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## Source compiled with OpenMP support and model fit using 1 thread(s).
##
## ----------------------------------------
## Chain 1
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 2
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 3
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
summary(ms_full_full)
##
## Call:
## msPGOcc(occ.formula = occ.full, det.formula = det.full, data = data_list,
## n.samples = 5000, n.report = 500, n.burn = 3000, n.thin = 2,
## n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.7233
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -0.8068 0.7017 -2.1659 -0.8233 0.6328 1.0321 212
## Cogon_Patch_Size -0.4567 0.6461 -1.7779 -0.4482 0.8818 1.0159 834
## Veg_shannon_index 1.0446 0.4693 0.1343 1.0315 1.9466 1.0246 349
## total_shrub_cover -0.9063 0.6649 -2.3112 -0.8794 0.3866 1.0012 549
## Avg_Cogongrass_Cover 1.9758 0.7211 0.5793 1.9694 3.3724 1.0350 270
## Tree_Density -1.8700 0.8433 -3.4993 -1.8809 -0.0413 1.0024 624
## Avg_Canopy_Cover 1.8959 0.7614 0.3489 1.8634 3.4454 1.0193 696
## avg_veg_height -0.3775 0.4766 -1.3291 -0.3724 0.5484 1.0177 354
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 2.2035 3.3306 0.0615 1.1234 10.7415 1.0250 227
## Cogon_Patch_Size 2.6941 4.5858 0.0831 1.2960 14.4580 1.0079 244
## Veg_shannon_index 0.7356 1.1617 0.0476 0.3644 3.6505 1.0738 579
## total_shrub_cover 2.4291 3.6406 0.0883 1.2513 11.8319 1.0163 205
## Avg_Cogongrass_Cover 1.1960 1.9298 0.0539 0.5565 5.9335 1.0935 456
## Tree_Density 4.9003 8.0189 0.1159 2.3228 27.9327 1.0673 237
## Avg_Canopy_Cover 4.6231 5.9500 0.2577 2.7727 21.0284 1.1182 372
## avg_veg_height 0.5229 0.7936 0.0444 0.2863 2.3671 1.0404 883
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 3.2721 2.9889 0.1637 2.4632 11.3359 1.0116 95
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.7656 0.3029 -3.3456 -2.7685 -2.1641 1.0083 1512
## shrub_cover 0.4125 0.3202 -0.2259 0.4092 1.0602 1.0018 1074
## veg_height 0.0934 0.2003 -0.3132 0.0962 0.4783 1.0029 1206
## week -0.1021 0.1399 -0.3870 -0.1001 0.1604 1.0003 1571
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.6758 0.6525 0.1540 0.5016 2.1053 1.0337 1144
## shrub_cover 0.7160 0.6317 0.1451 0.5487 2.2524 1.0069 1254
## veg_height 0.2703 0.2516 0.0638 0.2060 0.9186 1.0134 1635
## week 0.1059 0.0919 0.0253 0.0788 0.3540 1.0100 1878
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50%
## (Intercept)-Canis_latrans -0.0090 1.0512 -1.9782 -0.0658
## (Intercept)-Procyon_lotor -0.0045 1.0246 -1.9585 -0.0300
## (Intercept)-Dasypus_novemcinctus -1.1743 0.9200 -3.0914 -1.1589
## (Intercept)-Lynx_rufus -0.3378 1.2797 -2.4726 -0.4722
## (Intercept)-Didelphis_virginiana -1.8060 1.1306 -4.3411 -1.6974
## (Intercept)-Sylvilagus_floridanus -1.0004 1.0704 -3.2799 -0.9656
## (Intercept)-Meleagris_gallopavo -0.8676 1.1917 -3.1285 -0.9042
## (Intercept)-Sciurus_carolinensis -1.8607 1.3165 -5.1120 -1.6752
## Cogon_Patch_Size-Canis_latrans 0.5418 1.1215 -1.1175 0.3471
## Cogon_Patch_Size-Procyon_lotor -1.0377 0.7499 -2.6061 -1.0054
## Cogon_Patch_Size-Dasypus_novemcinctus -0.4632 0.8088 -2.0492 -0.4687
## Cogon_Patch_Size-Lynx_rufus -0.7793 1.3127 -3.2804 -0.7783
## Cogon_Patch_Size-Didelphis_virginiana 0.8068 1.0370 -0.7675 0.6572
## Cogon_Patch_Size-Sylvilagus_floridanus -1.6391 1.5560 -5.3035 -1.3204
## Cogon_Patch_Size-Meleagris_gallopavo -0.1933 1.2486 -2.2345 -0.3113
## Cogon_Patch_Size-Sciurus_carolinensis -1.3152 1.2773 -4.3046 -1.1259
## Veg_shannon_index-Canis_latrans 1.3505 0.6465 0.2050 1.3049
## Veg_shannon_index-Procyon_lotor 1.4022 0.6085 0.3313 1.3561
## Veg_shannon_index-Dasypus_novemcinctus 0.7118 0.5780 -0.4846 0.7462
## Veg_shannon_index-Lynx_rufus 0.9760 0.7806 -0.5800 0.9794
## Veg_shannon_index-Didelphis_virginiana 1.2407 0.6776 0.0409 1.1942
## Veg_shannon_index-Sylvilagus_floridanus 1.1697 0.6841 -0.0441 1.1374
## Veg_shannon_index-Meleagris_gallopavo 1.3312 0.7456 -0.0162 1.2731
## Veg_shannon_index-Sciurus_carolinensis 0.4292 0.8018 -1.3046 0.5302
## total_shrub_cover-Canis_latrans 0.5195 1.0310 -1.0242 0.3113
## total_shrub_cover-Procyon_lotor -1.1996 0.6726 -2.6671 -1.1431
## total_shrub_cover-Dasypus_novemcinctus -0.4104 0.8296 -2.1180 -0.3879
## total_shrub_cover-Lynx_rufus -1.6341 1.3570 -4.9862 -1.3930
## total_shrub_cover-Didelphis_virginiana -1.2495 1.0566 -3.8663 -1.1071
## total_shrub_cover-Sylvilagus_floridanus -0.9661 1.1850 -3.7467 -0.8700
## total_shrub_cover-Meleagris_gallopavo -2.2205 1.4564 -6.1062 -1.9795
## total_shrub_cover-Sciurus_carolinensis -1.1155 1.2479 -4.1252 -0.9319
## Avg_Cogongrass_Cover-Canis_latrans 2.3239 0.9388 0.6855 2.2343
## Avg_Cogongrass_Cover-Procyon_lotor 2.1067 0.8936 0.4229 2.0845
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 2.5651 0.9689 0.8925 2.4699
## Avg_Cogongrass_Cover-Lynx_rufus 2.3553 1.0198 0.6331 2.2586
## Avg_Cogongrass_Cover-Didelphis_virginiana 2.0599 0.9118 0.2939 2.0561
## Avg_Cogongrass_Cover-Sylvilagus_floridanus 1.3463 1.0692 -0.9618 1.3973
## Avg_Cogongrass_Cover-Meleagris_gallopavo 1.5654 1.2852 -1.4737 1.6965
## Avg_Cogongrass_Cover-Sciurus_carolinensis 2.2577 0.9648 0.5301 2.1986
## Tree_Density-Canis_latrans -3.0159 1.5438 -6.6739 -2.7414
## Tree_Density-Procyon_lotor -1.5675 0.7832 -3.1011 -1.5792
## Tree_Density-Dasypus_novemcinctus -3.9960 2.0170 -8.9844 -3.5428
## Tree_Density-Lynx_rufus -0.0632 1.5827 -2.4492 -0.2457
## Tree_Density-Didelphis_virginiana -2.0309 1.3722 -4.8798 -2.0367
## Tree_Density-Sylvilagus_floridanus -2.6718 1.6915 -6.8882 -2.4458
## Tree_Density-Meleagris_gallopavo -2.3424 1.6040 -5.9202 -2.2589
## Tree_Density-Sciurus_carolinensis -2.2230 1.6304 -5.6430 -2.1458
## Avg_Canopy_Cover-Canis_latrans 0.1253 0.6631 -1.1842 0.1240
## Avg_Canopy_Cover-Procyon_lotor 1.8202 0.7835 0.4581 1.7588
## Avg_Canopy_Cover-Dasypus_novemcinctus 2.3995 0.8867 0.9707 2.2881
## Avg_Canopy_Cover-Lynx_rufus 0.7126 1.2010 -1.5418 0.6385
## Avg_Canopy_Cover-Didelphis_virginiana 3.2698 1.3652 1.3448 3.0232
## Avg_Canopy_Cover-Sylvilagus_floridanus 4.0849 1.9340 1.3010 3.7218
## Avg_Canopy_Cover-Meleagris_gallopavo 2.7940 1.5071 0.5634 2.5507
## Avg_Canopy_Cover-Sciurus_carolinensis 3.2112 1.5352 1.1183 2.9039
## avg_veg_height-Canis_latrans -0.4520 0.5942 -1.6194 -0.4446
## avg_veg_height-Procyon_lotor -0.3607 0.5932 -1.5398 -0.3607
## avg_veg_height-Dasypus_novemcinctus -0.1472 0.6018 -1.2957 -0.1754
## avg_veg_height-Lynx_rufus -0.5223 0.7620 -2.0983 -0.4956
## avg_veg_height-Didelphis_virginiana -0.5532 0.6815 -2.0074 -0.5064
## avg_veg_height-Sylvilagus_floridanus -0.5963 0.6987 -2.0390 -0.5655
## avg_veg_height-Meleagris_gallopavo -0.4066 0.7986 -2.0498 -0.3921
## avg_veg_height-Sciurus_carolinensis 0.0135 0.7108 -1.1991 -0.0382
## 97.5% Rhat ESS
## (Intercept)-Canis_latrans 2.2652 1.0535 261
## (Intercept)-Procyon_lotor 1.9709 1.0464 161
## (Intercept)-Dasypus_novemcinctus 0.6105 1.0174 555
## (Intercept)-Lynx_rufus 2.6349 1.0504 150
## (Intercept)-Didelphis_virginiana 0.1450 1.0113 366
## (Intercept)-Sylvilagus_floridanus 1.1566 1.0122 384
## (Intercept)-Meleagris_gallopavo 1.7702 1.0253 272
## (Intercept)-Sciurus_carolinensis 0.2714 1.0063 242
## Cogon_Patch_Size-Canis_latrans 3.3524 1.0065 396
## Cogon_Patch_Size-Procyon_lotor 0.3569 1.0013 277
## Cogon_Patch_Size-Dasypus_novemcinctus 1.1802 1.0153 861
## Cogon_Patch_Size-Lynx_rufus 1.8497 1.0098 227
## Cogon_Patch_Size-Didelphis_virginiana 3.2334 1.0040 276
## Cogon_Patch_Size-Sylvilagus_floridanus 0.4717 1.0095 220
## Cogon_Patch_Size-Meleagris_gallopavo 2.7673 1.0627 354
## Cogon_Patch_Size-Sciurus_carolinensis 0.6320 1.0405 311
## Veg_shannon_index-Canis_latrans 2.7728 1.0139 433
## Veg_shannon_index-Procyon_lotor 2.7434 1.0200 281
## Veg_shannon_index-Dasypus_novemcinctus 1.7769 1.0065 713
## Veg_shannon_index-Lynx_rufus 2.5960 1.0092 481
## Veg_shannon_index-Didelphis_virginiana 2.6797 1.0244 543
## Veg_shannon_index-Sylvilagus_floridanus 2.6191 1.0305 555
## Veg_shannon_index-Meleagris_gallopavo 3.0231 1.0314 590
## Veg_shannon_index-Sciurus_carolinensis 1.7477 1.0092 481
## total_shrub_cover-Canis_latrans 3.0787 1.0321 294
## total_shrub_cover-Procyon_lotor -0.0633 1.0200 878
## total_shrub_cover-Dasypus_novemcinctus 1.1742 1.0060 483
## total_shrub_cover-Lynx_rufus 0.4892 1.0196 204
## total_shrub_cover-Didelphis_virginiana 0.3835 1.0172 308
## total_shrub_cover-Sylvilagus_floridanus 1.1737 1.0046 349
## total_shrub_cover-Meleagris_gallopavo -0.1595 1.0115 221
## total_shrub_cover-Sciurus_carolinensis 0.9099 1.0055 233
## Avg_Cogongrass_Cover-Canis_latrans 4.3972 1.0114 442
## Avg_Cogongrass_Cover-Procyon_lotor 3.9501 1.0122 321
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 4.7224 1.0189 366
## Avg_Cogongrass_Cover-Lynx_rufus 4.6813 1.0287 458
## Avg_Cogongrass_Cover-Didelphis_virginiana 3.9342 1.0160 418
## Avg_Cogongrass_Cover-Sylvilagus_floridanus 3.3675 1.0178 399
## Avg_Cogongrass_Cover-Meleagris_gallopavo 3.7669 1.0218 326
## Avg_Cogongrass_Cover-Sciurus_carolinensis 4.3350 1.0517 386
## Tree_Density-Canis_latrans -0.8165 1.0128 335
## Tree_Density-Procyon_lotor 0.0071 1.0061 583
## Tree_Density-Dasypus_novemcinctus -1.3309 1.0531 220
## Tree_Density-Lynx_rufus 3.8285 1.0416 229
## Tree_Density-Didelphis_virginiana 0.8736 1.0212 389
## Tree_Density-Sylvilagus_floridanus 0.1284 1.0197 303
## Tree_Density-Meleagris_gallopavo 0.7637 1.0265 321
## Tree_Density-Sciurus_carolinensis 0.9576 1.0379 352
## Avg_Canopy_Cover-Canis_latrans 1.4369 1.0042 801
## Avg_Canopy_Cover-Procyon_lotor 3.5405 1.0176 400
## Avg_Canopy_Cover-Dasypus_novemcinctus 4.4479 1.0156 479
## Avg_Canopy_Cover-Lynx_rufus 3.3742 1.0067 265
## Avg_Canopy_Cover-Didelphis_virginiana 6.5033 1.1246 285
## Avg_Canopy_Cover-Sylvilagus_floridanus 8.7735 1.1973 216
## Avg_Canopy_Cover-Meleagris_gallopavo 6.4032 1.0091 314
## Avg_Canopy_Cover-Sciurus_carolinensis 6.8460 1.1154 247
## avg_veg_height-Canis_latrans 0.7304 1.0063 555
## avg_veg_height-Procyon_lotor 0.7814 1.0060 760
## avg_veg_height-Dasypus_novemcinctus 1.1247 1.0062 628
## avg_veg_height-Lynx_rufus 0.9708 1.0110 523
## avg_veg_height-Didelphis_virginiana 0.7722 1.0069 454
## avg_veg_height-Sylvilagus_floridanus 0.7023 1.0230 585
## avg_veg_height-Meleagris_gallopavo 1.1689 1.0237 406
## avg_veg_height-Sciurus_carolinensis 1.6055 1.0353 575
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.7539 0.1825 -3.1176 -2.7471 -2.4093 1.0141
## (Intercept)-Procyon_lotor -2.3008 0.1396 -2.5825 -2.3011 -2.0449 1.0058
## (Intercept)-Dasypus_novemcinctus -1.8260 0.1721 -2.1652 -1.8193 -1.5008 1.0001
## (Intercept)-Lynx_rufus -3.5263 0.3331 -4.1855 -3.5177 -2.9127 1.0457
## (Intercept)-Didelphis_virginiana -2.6612 0.2847 -3.2234 -2.6669 -2.1034 1.0337
## (Intercept)-Sylvilagus_floridanus -3.1714 0.2594 -3.7158 -3.1653 -2.6962 1.0125
## (Intercept)-Meleagris_gallopavo -3.7120 0.4488 -4.6699 -3.6916 -2.8876 1.0260
## (Intercept)-Sciurus_carolinensis -2.8411 0.3199 -3.5066 -2.8354 -2.2497 1.0016
## shrub_cover-Canis_latrans -0.3446 0.2247 -0.7862 -0.3447 0.0974 1.0230
## shrub_cover-Procyon_lotor 0.2765 0.1576 -0.0413 0.2783 0.5758 1.0037
## shrub_cover-Dasypus_novemcinctus 0.9996 0.3112 0.3937 0.9994 1.6187 1.0067
## shrub_cover-Lynx_rufus 0.0872 0.3828 -0.6962 0.1006 0.7996 1.0265
## shrub_cover-Didelphis_virginiana 1.0801 0.3828 0.3716 1.0694 1.8692 1.0169
## shrub_cover-Sylvilagus_floridanus 0.5595 0.3794 -0.2144 0.5585 1.2914 1.0298
## shrub_cover-Meleagris_gallopavo -0.4275 0.4185 -1.2617 -0.4102 0.3585 1.0281
## shrub_cover-Sciurus_carolinensis 1.1265 0.4203 0.2931 1.1330 1.9361 1.0016
## veg_height-Canis_latrans -0.5918 0.1849 -0.9680 -0.5859 -0.2448 1.0246
## veg_height-Procyon_lotor 0.3537 0.1210 0.1154 0.3534 0.5920 1.0057
## veg_height-Dasypus_novemcinctus 0.2808 0.1413 0.0143 0.2781 0.5596 1.0005
## veg_height-Lynx_rufus 0.1008 0.2398 -0.3827 0.1052 0.5547 1.0009
## veg_height-Didelphis_virginiana 0.4809 0.2428 0.0212 0.4768 0.9788 1.0091
## veg_height-Sylvilagus_floridanus 0.1647 0.2511 -0.3398 0.1609 0.6526 1.0428
## veg_height-Meleagris_gallopavo -0.2173 0.3652 -0.9543 -0.2148 0.4815 1.0325
## veg_height-Sciurus_carolinensis 0.1597 0.2239 -0.2747 0.1578 0.6068 1.0045
## week-Canis_latrans 0.0570 0.1343 -0.2055 0.0614 0.3072 1.0002
## week-Procyon_lotor -0.0600 0.1237 -0.3105 -0.0589 0.1719 1.0018
## week-Dasypus_novemcinctus -0.1804 0.1366 -0.4577 -0.1737 0.0765 1.0017
## week-Lynx_rufus -0.0463 0.1940 -0.4486 -0.0402 0.3146 1.0040
## week-Didelphis_virginiana -0.2381 0.2256 -0.7253 -0.2233 0.1660 1.0035
## week-Sylvilagus_floridanus -0.1656 0.2105 -0.6187 -0.1534 0.2098 1.0040
## week-Meleagris_gallopavo -0.2882 0.2271 -0.7947 -0.2697 0.1143 1.0018
## week-Sciurus_carolinensis 0.1165 0.1866 -0.2440 0.1190 0.4684 1.0032
## ESS
## (Intercept)-Canis_latrans 745
## (Intercept)-Procyon_lotor 1195
## (Intercept)-Dasypus_novemcinctus 1002
## (Intercept)-Lynx_rufus 225
## (Intercept)-Didelphis_virginiana 572
## (Intercept)-Sylvilagus_floridanus 659
## (Intercept)-Meleagris_gallopavo 237
## (Intercept)-Sciurus_carolinensis 357
## shrub_cover-Canis_latrans 697
## shrub_cover-Procyon_lotor 1715
## shrub_cover-Dasypus_novemcinctus 661
## shrub_cover-Lynx_rufus 281
## shrub_cover-Didelphis_virginiana 504
## shrub_cover-Sylvilagus_floridanus 458
## shrub_cover-Meleagris_gallopavo 289
## shrub_cover-Sciurus_carolinensis 439
## veg_height-Canis_latrans 848
## veg_height-Procyon_lotor 1742
## veg_height-Dasypus_novemcinctus 1366
## veg_height-Lynx_rufus 736
## veg_height-Didelphis_virginiana 783
## veg_height-Sylvilagus_floridanus 835
## veg_height-Meleagris_gallopavo 313
## veg_height-Sciurus_carolinensis 802
## week-Canis_latrans 1533
## week-Procyon_lotor 1603
## week-Dasypus_novemcinctus 1553
## week-Lynx_rufus 958
## week-Didelphis_virginiana 1259
## week-Sylvilagus_floridanus 971
## week-Meleagris_gallopavo 851
## week-Sciurus_carolinensis 1517
#Includes cover for detection and only foraging for occupancy
ms_cover_forage <- msPGOcc(
occ.formula = occ.forage,
det.formula = det.cover,
data = data_list,
n.samples = 5000,
n.thin = 2,
n.burn = 3000,
n.chains = 3,
n.report = 500,
)
## ----------------------------------------
## Preparing to run the model
## ----------------------------------------
## No prior specified for beta.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for alpha.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for tau.sq.beta.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for tau.sq.alpha.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for sigma.sq.psi.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## z is not specified in initial values.
## Setting initial values based on observed data
## beta.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## alpha.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## tau.sq.beta is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## tau.sq.alpha is not specified in initial values.
## Setting to initial values to random values between 0.5 and 10
## beta is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## alpha is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## sigma.sq.psi is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## ----------------------------------------
## Model description
## ----------------------------------------
## Multi-species Occupancy Model with Polya-Gamma latent
## variable fit with 32 sites and 8 species.
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## Source compiled with OpenMP support and model fit using 1 thread(s).
##
## ----------------------------------------
## Chain 1
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 2
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 3
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
summary(ms_cover_forage)
##
## Call:
## msPGOcc(occ.formula = occ.forage, det.formula = det.cover, data = data_list,
## n.samples = 5000, n.report = 500, n.burn = 3000, n.thin = 2,
## n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.5115
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -0.3563 0.3822 -1.1027 -0.3605 0.4256 1.0474 649
## Veg_shannon_index 0.3669 0.2759 -0.1738 0.3548 0.9264 1.0011 981
## Avg_Cogongrass_Cover 0.3286 0.3016 -0.2869 0.3255 0.9202 1.0206 866
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.6343 0.8931 0.0526 0.3995 2.5336 1.0054 972
## Veg_shannon_index 0.3009 0.4192 0.0364 0.1879 1.2203 1.0464 1306
## Avg_Cogongrass_Cover 0.3625 0.4497 0.0384 0.2219 1.6739 1.0119 978
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 0.6812 0.6882 0.0688 0.4605 2.7343 1.0111 222
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.7235 0.3296 -3.3648 -2.7272 -2.0338 1.0005 2335
## shrub_cover 0.2434 0.3165 -0.3825 0.2366 0.8852 1.0094 1566
## veg_height 0.0642 0.2052 -0.3634 0.0730 0.4629 1.0105 1346
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.7866 0.7692 0.1702 0.5948 2.5029 1.0101 811
## shrub_cover 0.6956 0.6286 0.1296 0.5238 2.2393 1.0006 995
## veg_height 0.2515 0.2321 0.0557 0.1862 0.8275 1.0318 2105
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50%
## (Intercept)-Canis_latrans 0.0609 0.5577 -0.9751 0.0243
## (Intercept)-Procyon_lotor 0.1606 0.5356 -0.8693 0.1601
## (Intercept)-Dasypus_novemcinctus -0.5385 0.4615 -1.4905 -0.5320
## (Intercept)-Lynx_rufus -0.1919 0.6664 -1.3406 -0.2373
## (Intercept)-Didelphis_virginiana -0.9118 0.5365 -2.0261 -0.8856
## (Intercept)-Sylvilagus_floridanus -0.4209 0.5251 -1.4614 -0.4152
## (Intercept)-Meleagris_gallopavo -0.1339 0.6483 -1.2340 -0.2045
## (Intercept)-Sciurus_carolinensis -0.9253 0.5582 -2.0960 -0.8937
## Veg_shannon_index-Canis_latrans 0.6514 0.4006 -0.0640 0.6243
## Veg_shannon_index-Procyon_lotor 0.4579 0.3541 -0.1887 0.4414
## Veg_shannon_index-Dasypus_novemcinctus 0.1980 0.3492 -0.5211 0.2040
## Veg_shannon_index-Lynx_rufus 0.2199 0.4833 -0.8262 0.2363
## Veg_shannon_index-Didelphis_virginiana 0.4821 0.3827 -0.2213 0.4634
## Veg_shannon_index-Sylvilagus_floridanus 0.4422 0.4031 -0.3157 0.4269
## Veg_shannon_index-Meleagris_gallopavo 0.5282 0.4812 -0.3564 0.5057
## Veg_shannon_index-Sciurus_carolinensis -0.0107 0.4096 -0.9035 0.0181
## Avg_Cogongrass_Cover-Canis_latrans 0.5965 0.4091 -0.0972 0.5613
## Avg_Cogongrass_Cover-Procyon_lotor 0.3688 0.3812 -0.3408 0.3622
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 0.4451 0.3527 -0.2273 0.4388
## Avg_Cogongrass_Cover-Lynx_rufus 0.5861 0.4299 -0.1909 0.5586
## Avg_Cogongrass_Cover-Didelphis_virginiana 0.4388 0.3898 -0.3215 0.4439
## Avg_Cogongrass_Cover-Sylvilagus_floridanus -0.1230 0.4846 -1.2849 -0.0804
## Avg_Cogongrass_Cover-Meleagris_gallopavo -0.0705 0.6498 -1.4964 -0.0281
## Avg_Cogongrass_Cover-Sciurus_carolinensis 0.4187 0.3640 -0.2856 0.4165
## 97.5% Rhat ESS
## (Intercept)-Canis_latrans 1.2727 1.0117 587
## (Intercept)-Procyon_lotor 1.2265 1.0208 527
## (Intercept)-Dasypus_novemcinctus 0.3791 1.0081 1320
## (Intercept)-Lynx_rufus 1.2612 1.0305 394
## (Intercept)-Didelphis_virginiana 0.0337 1.0071 932
## (Intercept)-Sylvilagus_floridanus 0.6150 1.0320 827
## (Intercept)-Meleagris_gallopavo 1.3807 1.0570 314
## (Intercept)-Sciurus_carolinensis 0.0597 1.0080 889
## Veg_shannon_index-Canis_latrans 1.5455 1.0042 1318
## Veg_shannon_index-Procyon_lotor 1.1981 1.0032 1439
## Veg_shannon_index-Dasypus_novemcinctus 0.8695 1.0028 1969
## Veg_shannon_index-Lynx_rufus 1.1109 1.0170 1025
## Veg_shannon_index-Didelphis_virginiana 1.2749 1.0015 1590
## Veg_shannon_index-Sylvilagus_floridanus 1.3174 1.0065 1574
## Veg_shannon_index-Meleagris_gallopavo 1.5752 1.0019 931
## Veg_shannon_index-Sciurus_carolinensis 0.7054 1.0017 1379
## Avg_Cogongrass_Cover-Canis_latrans 1.5312 1.0013 1298
## Avg_Cogongrass_Cover-Procyon_lotor 1.1809 1.0117 1654
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 1.1815 1.0150 2213
## Avg_Cogongrass_Cover-Lynx_rufus 1.5564 1.0018 1358
## Avg_Cogongrass_Cover-Didelphis_virginiana 1.1923 1.0077 1271
## Avg_Cogongrass_Cover-Sylvilagus_floridanus 0.6972 1.0193 796
## Avg_Cogongrass_Cover-Meleagris_gallopavo 1.1092 1.0072 528
## Avg_Cogongrass_Cover-Sciurus_carolinensis 1.1514 1.0110 1762
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.7145 0.1824 -3.0964 -2.7125 -2.3721 1.0115
## (Intercept)-Procyon_lotor -2.2951 0.1418 -2.5774 -2.2874 -2.0323 1.0056
## (Intercept)-Dasypus_novemcinctus -1.7585 0.1631 -2.0976 -1.7529 -1.4625 1.0078
## (Intercept)-Lynx_rufus -3.5511 0.3480 -4.2449 -3.5419 -2.9072 1.0054
## (Intercept)-Didelphis_virginiana -2.6096 0.2838 -3.1671 -2.6029 -2.0817 1.0303
## (Intercept)-Sylvilagus_floridanus -3.1448 0.2755 -3.7412 -3.1285 -2.6424 1.0207
## (Intercept)-Meleagris_gallopavo -3.8585 0.4696 -4.8018 -3.8478 -2.9231 1.0119
## (Intercept)-Sciurus_carolinensis -2.6375 0.3020 -3.2708 -2.6226 -2.0784 1.0021
## shrub_cover-Canis_latrans -0.2799 0.2132 -0.6808 -0.2857 0.1407 1.0063
## shrub_cover-Procyon_lotor 0.2451 0.1642 -0.0848 0.2490 0.5544 1.0023
## shrub_cover-Dasypus_novemcinctus 0.8604 0.2940 0.3107 0.8534 1.4415 1.0167
## shrub_cover-Lynx_rufus -0.2280 0.3775 -0.9495 -0.2384 0.5246 1.0262
## shrub_cover-Didelphis_virginiana 0.9963 0.3750 0.3153 0.9863 1.7719 1.0047
## shrub_cover-Sylvilagus_floridanus 0.2168 0.4384 -0.6198 0.2028 1.0843 1.0201
## shrub_cover-Meleagris_gallopavo -0.6649 0.4145 -1.5332 -0.6527 0.1638 1.0091
## shrub_cover-Sciurus_carolinensis 0.8671 0.4119 0.0666 0.8632 1.6903 1.0006
## veg_height-Canis_latrans -0.5701 0.1832 -0.9493 -0.5622 -0.2241 1.0204
## veg_height-Procyon_lotor 0.3399 0.1235 0.0924 0.3418 0.5783 1.0104
## veg_height-Dasypus_novemcinctus 0.2477 0.1333 -0.0121 0.2456 0.5140 1.0157
## veg_height-Lynx_rufus 0.0163 0.2527 -0.4903 0.0192 0.4985 1.0253
## veg_height-Didelphis_virginiana 0.4547 0.2445 -0.0112 0.4486 0.9599 1.0205
## veg_height-Sylvilagus_floridanus 0.1739 0.2447 -0.3123 0.1773 0.6618 1.0067
## veg_height-Meleagris_gallopavo -0.1799 0.3864 -0.9141 -0.1777 0.5755 1.0200
## veg_height-Sciurus_carolinensis 0.0754 0.2117 -0.3273 0.0723 0.4908 1.0204
## ESS
## (Intercept)-Canis_latrans 821
## (Intercept)-Procyon_lotor 1357
## (Intercept)-Dasypus_novemcinctus 1341
## (Intercept)-Lynx_rufus 336
## (Intercept)-Didelphis_virginiana 775
## (Intercept)-Sylvilagus_floridanus 473
## (Intercept)-Meleagris_gallopavo 193
## (Intercept)-Sciurus_carolinensis 775
## shrub_cover-Canis_latrans 1015
## shrub_cover-Procyon_lotor 1400
## shrub_cover-Dasypus_novemcinctus 1200
## shrub_cover-Lynx_rufus 427
## shrub_cover-Didelphis_virginiana 630
## shrub_cover-Sylvilagus_floridanus 471
## shrub_cover-Meleagris_gallopavo 232
## shrub_cover-Sciurus_carolinensis 761
## veg_height-Canis_latrans 712
## veg_height-Procyon_lotor 1299
## veg_height-Dasypus_novemcinctus 2066
## veg_height-Lynx_rufus 623
## veg_height-Didelphis_virginiana 1119
## veg_height-Sylvilagus_floridanus 765
## veg_height-Meleagris_gallopavo 450
## veg_height-Sciurus_carolinensis 1147
# Includes movement covariates of occupancy and cover for detection
ms_cover_move <- msPGOcc(
occ.formula = occ.move,
det.formula = det.cover,
data = data_list,
n.samples = 5000,
n.thin = 2,
n.burn = 3000,
n.chains = 3,
n.report = 500,
)
## ----------------------------------------
## Preparing to run the model
## ----------------------------------------
## No prior specified for beta.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for alpha.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for tau.sq.beta.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for tau.sq.alpha.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for sigma.sq.psi.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## z is not specified in initial values.
## Setting initial values based on observed data
## beta.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## alpha.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## tau.sq.beta is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## tau.sq.alpha is not specified in initial values.
## Setting to initial values to random values between 0.5 and 10
## beta is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## alpha is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## sigma.sq.psi is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## ----------------------------------------
## Model description
## ----------------------------------------
## Multi-species Occupancy Model with Polya-Gamma latent
## variable fit with 32 sites and 8 species.
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## Source compiled with OpenMP support and model fit using 1 thread(s).
##
## ----------------------------------------
## Chain 1
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 2
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 3
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
summary(ms_cover_move)
##
## Call:
## msPGOcc(occ.formula = occ.move, det.formula = det.cover, data = data_list,
## n.samples = 5000, n.report = 500, n.burn = 3000, n.thin = 2,
## n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.5467
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -0.2410 0.4413 -1.1164 -0.2431 0.6441 1.0235 358
## Cogon_Patch_Size 0.0025 0.4137 -0.8551 0.0097 0.8065 1.0020 1111
## Avg_Cogongrass_Cover 0.1116 0.3464 -0.5658 0.1155 0.7890 1.0134 812
## total_shrub_cover -0.8950 0.4518 -1.8846 -0.8696 -0.1036 1.0041 459
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.6212 0.8169 0.0433 0.3647 2.5250 1.0249 552
## Cogon_Patch_Size 0.7446 1.0352 0.0563 0.4264 3.3710 1.0120 838
## Avg_Cogongrass_Cover 0.4431 0.6128 0.0407 0.2482 2.0453 1.0121 876
## total_shrub_cover 0.8749 1.1329 0.0659 0.5077 3.8876 1.0093 593
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 1.2798 1.1155 0.1038 1.0007 4.3114 1.1055 285
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.7453 0.2780 -3.2991 -2.7499 -2.2018 1.0023 1448
## shrub_cover 0.5153 0.3164 -0.0896 0.5075 1.1646 1.0137 1004
## veg_height 0.0902 0.1952 -0.2938 0.0922 0.4708 1.0117 1572
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.5494 0.4609 0.1266 0.4236 1.7954 1.0076 966
## shrub_cover 0.6972 0.6744 0.1299 0.5181 2.3846 1.0105 821
## veg_height 0.2453 0.2179 0.0568 0.1886 0.8013 1.0318 1542
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50%
## (Intercept)-Canis_latrans 0.1502 0.6055 -0.9725 0.1266
## (Intercept)-Procyon_lotor 0.3017 0.6526 -0.8720 0.2593
## (Intercept)-Dasypus_novemcinctus -0.3644 0.5664 -1.5065 -0.3751
## (Intercept)-Lynx_rufus -0.2139 0.6492 -1.5251 -0.2133
## (Intercept)-Didelphis_virginiana -0.6568 0.6562 -2.0626 -0.6326
## (Intercept)-Sylvilagus_floridanus -0.1254 0.6576 -1.3180 -0.1699
## (Intercept)-Meleagris_gallopavo -0.4404 0.6822 -1.8192 -0.4334
## (Intercept)-Sciurus_carolinensis -0.6424 0.6775 -2.0417 -0.5814
## Cogon_Patch_Size-Canis_latrans 0.6660 0.6375 -0.3184 0.5798
## Cogon_Patch_Size-Procyon_lotor -0.1374 0.4616 -1.0920 -0.1229
## Cogon_Patch_Size-Dasypus_novemcinctus 0.0321 0.4444 -0.8642 0.0400
## Cogon_Patch_Size-Lynx_rufus -0.0527 0.7015 -1.3758 -0.0859
## Cogon_Patch_Size-Didelphis_virginiana 0.5798 0.5003 -0.3261 0.5349
## Cogon_Patch_Size-Sylvilagus_floridanus -0.6345 0.8111 -2.6638 -0.5075
## Cogon_Patch_Size-Meleagris_gallopavo 0.0588 0.6474 -1.1898 0.0473
## Cogon_Patch_Size-Sciurus_carolinensis -0.4773 0.6512 -2.0017 -0.3918
## Avg_Cogongrass_Cover-Canis_latrans 0.2838 0.4419 -0.4861 0.2498
## Avg_Cogongrass_Cover-Procyon_lotor 0.0526 0.4495 -0.8404 0.0530
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 0.3163 0.4167 -0.4651 0.2865
## Avg_Cogongrass_Cover-Lynx_rufus 0.4564 0.5410 -0.4338 0.4118
## Avg_Cogongrass_Cover-Didelphis_virginiana 0.0872 0.4737 -0.8853 0.0882
## Avg_Cogongrass_Cover-Sylvilagus_floridanus -0.2456 0.5677 -1.5193 -0.2065
## Avg_Cogongrass_Cover-Meleagris_gallopavo -0.3839 0.6772 -1.8089 -0.3300
## Avg_Cogongrass_Cover-Sciurus_carolinensis 0.3054 0.4592 -0.5588 0.2866
## total_shrub_cover-Canis_latrans -0.0067 0.6191 -1.0645 -0.0513
## total_shrub_cover-Procyon_lotor -1.1786 0.5751 -2.4581 -1.1083
## total_shrub_cover-Dasypus_novemcinctus -0.5268 0.5980 -1.8834 -0.4687
## total_shrub_cover-Lynx_rufus -1.2593 0.7924 -3.0381 -1.1696
## total_shrub_cover-Didelphis_virginiana -0.9110 0.6214 -2.3057 -0.8529
## total_shrub_cover-Sylvilagus_floridanus -1.1893 0.8138 -3.1076 -1.0865
## total_shrub_cover-Meleagris_gallopavo -1.4538 0.7450 -3.2233 -1.3683
## total_shrub_cover-Sciurus_carolinensis -0.8869 0.7328 -2.6590 -0.8099
## 97.5% Rhat ESS
## (Intercept)-Canis_latrans 1.4005 1.0260 610
## (Intercept)-Procyon_lotor 1.7058 1.0255 573
## (Intercept)-Dasypus_novemcinctus 0.7844 1.0147 570
## (Intercept)-Lynx_rufus 1.1506 1.0491 499
## (Intercept)-Didelphis_virginiana 0.5392 1.0042 528
## (Intercept)-Sylvilagus_floridanus 1.2770 1.0365 418
## (Intercept)-Meleagris_gallopavo 0.9076 1.0067 509
## (Intercept)-Sciurus_carolinensis 0.5624 1.0095 475
## Cogon_Patch_Size-Canis_latrans 2.1761 1.0046 935
## Cogon_Patch_Size-Procyon_lotor 0.7305 1.0093 1246
## Cogon_Patch_Size-Dasypus_novemcinctus 0.9033 1.0029 1550
## Cogon_Patch_Size-Lynx_rufus 1.4293 1.0015 759
## Cogon_Patch_Size-Didelphis_virginiana 1.6775 1.0037 1096
## Cogon_Patch_Size-Sylvilagus_floridanus 0.5507 1.0135 621
## Cogon_Patch_Size-Meleagris_gallopavo 1.3919 1.0041 994
## Cogon_Patch_Size-Sciurus_carolinensis 0.5569 1.0049 660
## Avg_Cogongrass_Cover-Canis_latrans 1.2625 1.0043 1419
## Avg_Cogongrass_Cover-Procyon_lotor 0.9158 1.0116 1292
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 1.2261 1.0086 1471
## Avg_Cogongrass_Cover-Lynx_rufus 1.7214 1.0129 1135
## Avg_Cogongrass_Cover-Didelphis_virginiana 1.0200 1.0091 1069
## Avg_Cogongrass_Cover-Sylvilagus_floridanus 0.7704 1.0058 793
## Avg_Cogongrass_Cover-Meleagris_gallopavo 0.8344 1.0187 498
## Avg_Cogongrass_Cover-Sciurus_carolinensis 1.3232 1.0050 1206
## total_shrub_cover-Canis_latrans 1.4357 1.0032 612
## total_shrub_cover-Procyon_lotor -0.2201 1.0086 632
## total_shrub_cover-Dasypus_novemcinctus 0.4712 1.0174 529
## total_shrub_cover-Lynx_rufus 0.0675 1.0151 410
## total_shrub_cover-Didelphis_virginiana 0.1573 1.0046 625
## total_shrub_cover-Sylvilagus_floridanus 0.1386 1.0031 368
## total_shrub_cover-Meleagris_gallopavo -0.2558 1.0030 394
## total_shrub_cover-Sciurus_carolinensis 0.3061 1.0118 338
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.7314 0.1857 -3.1044 -2.7288 -2.3804 1.0017
## (Intercept)-Procyon_lotor -2.3079 0.1371 -2.5720 -2.3058 -2.0452 1.0032
## (Intercept)-Dasypus_novemcinctus -1.8394 0.1846 -2.2300 -1.8338 -1.5015 1.0048
## (Intercept)-Lynx_rufus -3.3859 0.2897 -3.9932 -3.3726 -2.8543 1.0019
## (Intercept)-Didelphis_virginiana -2.6932 0.2806 -3.2453 -2.6866 -2.1593 1.0034
## (Intercept)-Sylvilagus_floridanus -3.2234 0.2606 -3.7392 -3.2214 -2.7271 1.0278
## (Intercept)-Meleagris_gallopavo -3.4436 0.4972 -4.4880 -3.4282 -2.5234 1.0114
## (Intercept)-Sciurus_carolinensis -2.8468 0.3192 -3.4942 -2.8446 -2.2379 1.0091
## shrub_cover-Canis_latrans -0.2619 0.2369 -0.7258 -0.2662 0.2025 1.0053
## shrub_cover-Procyon_lotor 0.3259 0.1598 0.0259 0.3274 0.6374 1.0015
## shrub_cover-Dasypus_novemcinctus 1.0620 0.3529 0.3923 1.0466 1.7716 1.0143
## shrub_cover-Lynx_rufus 0.1893 0.3611 -0.5700 0.2029 0.8646 1.0180
## shrub_cover-Didelphis_virginiana 1.1857 0.3857 0.4660 1.1783 1.9804 1.0077
## shrub_cover-Sylvilagus_floridanus 0.7633 0.4156 -0.0931 0.7642 1.5711 1.0363
## shrub_cover-Meleagris_gallopavo -0.2409 0.4539 -1.1389 -0.2412 0.6283 1.0022
## shrub_cover-Sciurus_carolinensis 1.1719 0.4099 0.3238 1.1842 1.9472 1.0440
## veg_height-Canis_latrans -0.5653 0.1823 -0.9368 -0.5577 -0.2220 1.0017
## veg_height-Procyon_lotor 0.3499 0.1237 0.1051 0.3508 0.5867 1.0129
## veg_height-Dasypus_novemcinctus 0.2776 0.1454 -0.0051 0.2764 0.5680 1.0028
## veg_height-Lynx_rufus 0.0834 0.2260 -0.3759 0.0817 0.5171 1.0022
## veg_height-Didelphis_virginiana 0.4434 0.2426 -0.0232 0.4400 0.9462 1.0227
## veg_height-Sylvilagus_floridanus 0.0822 0.2424 -0.3744 0.0822 0.5828 1.0177
## veg_height-Meleagris_gallopavo -0.0935 0.4228 -0.9452 -0.1084 0.7394 1.0229
## veg_height-Sciurus_carolinensis 0.1457 0.2270 -0.2999 0.1496 0.6008 1.0062
## ESS
## (Intercept)-Canis_latrans 565
## (Intercept)-Procyon_lotor 1474
## (Intercept)-Dasypus_novemcinctus 543
## (Intercept)-Lynx_rufus 520
## (Intercept)-Didelphis_virginiana 554
## (Intercept)-Sylvilagus_floridanus 474
## (Intercept)-Meleagris_gallopavo 260
## (Intercept)-Sciurus_carolinensis 436
## shrub_cover-Canis_latrans 647
## shrub_cover-Procyon_lotor 1416
## shrub_cover-Dasypus_novemcinctus 260
## shrub_cover-Lynx_rufus 422
## shrub_cover-Didelphis_virginiana 374
## shrub_cover-Sylvilagus_floridanus 396
## shrub_cover-Meleagris_gallopavo 316
## shrub_cover-Sciurus_carolinensis 384
## veg_height-Canis_latrans 568
## veg_height-Procyon_lotor 1623
## veg_height-Dasypus_novemcinctus 1419
## veg_height-Lynx_rufus 831
## veg_height-Didelphis_virginiana 961
## veg_height-Sylvilagus_floridanus 709
## veg_height-Meleagris_gallopavo 319
## veg_height-Sciurus_carolinensis 870
#Includes cover covariate of detection and only canopy for occupancy
ms_cover_canopy <- msPGOcc(
occ.formula = occ.canopy,
det.formula = det.cover,
data = data_list,
n.samples = 5000,
n.thin = 2,
n.burn = 3000,
n.chains = 3,
n.report = 500,
)
## ----------------------------------------
## Preparing to run the model
## ----------------------------------------
## No prior specified for beta.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for alpha.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for tau.sq.beta.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for tau.sq.alpha.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for sigma.sq.psi.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## z is not specified in initial values.
## Setting initial values based on observed data
## beta.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## alpha.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## tau.sq.beta is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## tau.sq.alpha is not specified in initial values.
## Setting to initial values to random values between 0.5 and 10
## beta is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## alpha is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## sigma.sq.psi is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## ----------------------------------------
## Model description
## ----------------------------------------
## Multi-species Occupancy Model with Polya-Gamma latent
## variable fit with 32 sites and 8 species.
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## Source compiled with OpenMP support and model fit using 1 thread(s).
##
## ----------------------------------------
## Chain 1
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 2
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 3
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
summary(ms_cover_canopy)
##
## Call:
## msPGOcc(occ.formula = occ.canopy, det.formula = det.cover, data = data_list,
## n.samples = 5000, n.report = 500, n.burn = 3000, n.thin = 2,
## n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.5212
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -0.4730 0.4541 -1.4053 -0.4648 0.4273 1.0050 707
## Tree_Density -0.8062 0.4725 -1.8265 -0.7810 0.0779 1.0030 818
## Avg_Canopy_Cover 1.1655 0.4805 0.2664 1.1255 2.2211 1.0062 777
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 1.0192 1.2174 0.0827 0.6692 3.9593 1.0452 646
## Tree_Density 1.1519 2.0269 0.0656 0.6023 5.2006 1.0409 882
## Avg_Canopy_Cover 1.2851 1.6567 0.1048 0.8204 5.5991 1.0325 687
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 0.7375 0.8698 0.0463 0.4228 3.133 1.032 144
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.7413 0.3206 -3.3383 -2.7491 -2.0519 1.0040 1705
## shrub_cover 0.3038 0.3156 -0.3342 0.2999 0.9478 1.0025 1531
## veg_height 0.1017 0.2059 -0.3112 0.1000 0.5025 1.0056 1814
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.7558 0.7034 0.1695 0.5679 2.5295 1.0062 1233
## shrub_cover 0.7242 0.6776 0.1444 0.5470 2.3561 1.0162 1620
## veg_height 0.2609 0.2376 0.0571 0.1944 0.8425 1.0139 1333
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50% 97.5%
## (Intercept)-Canis_latrans 0.0564 0.5894 -1.0647 0.0320 1.2285
## (Intercept)-Procyon_lotor 0.3114 0.6406 -0.9430 0.3092 1.5338
## (Intercept)-Dasypus_novemcinctus -0.8329 0.5630 -2.0786 -0.8074 0.1846
## (Intercept)-Lynx_rufus -0.0287 0.8216 -1.4473 -0.1244 1.7983
## (Intercept)-Didelphis_virginiana -1.2231 0.6647 -2.6810 -1.1627 -0.0711
## (Intercept)-Sylvilagus_floridanus -0.6166 0.6077 -1.8167 -0.5936 0.5702
## (Intercept)-Meleagris_gallopavo -0.2570 0.7167 -1.5829 -0.3024 1.3299
## (Intercept)-Sciurus_carolinensis -1.2843 0.7016 -2.7870 -1.2213 -0.0497
## Tree_Density-Canis_latrans -1.0215 0.6506 -2.5650 -0.9333 0.0299
## Tree_Density-Procyon_lotor -0.4864 0.4514 -1.4207 -0.4728 0.3715
## Tree_Density-Dasypus_novemcinctus -1.5022 0.9303 -3.8577 -1.3253 -0.2006
## Tree_Density-Lynx_rufus 0.2881 0.7620 -0.8789 0.1796 2.1787
## Tree_Density-Didelphis_virginiana -0.9947 0.7472 -2.7249 -0.9095 0.2344
## Tree_Density-Sylvilagus_floridanus -1.1516 0.8234 -3.0840 -1.0316 0.1560
## Tree_Density-Meleagris_gallopavo -1.0475 0.8741 -3.1515 -0.9392 0.4699
## Tree_Density-Sciurus_carolinensis -0.8754 0.7525 -2.6326 -0.7898 0.4050
## Avg_Canopy_Cover-Canis_latrans -0.0918 0.4824 -1.0428 -0.0939 0.8420
## Avg_Canopy_Cover-Procyon_lotor 1.0552 0.5096 0.1396 1.0250 2.1504
## Avg_Canopy_Cover-Dasypus_novemcinctus 1.1434 0.5053 0.2283 1.1042 2.2488
## Avg_Canopy_Cover-Lynx_rufus 0.7427 0.7304 -0.5814 0.7036 2.3425
## Avg_Canopy_Cover-Didelphis_virginiana 1.6452 0.7496 0.4786 1.5444 3.4421
## Avg_Canopy_Cover-Sylvilagus_floridanus 2.1952 1.0551 0.7131 1.9959 4.8480
## Avg_Canopy_Cover-Meleagris_gallopavo 1.6268 0.8737 0.2871 1.5003 3.7171
## Avg_Canopy_Cover-Sciurus_carolinensis 1.5330 0.7036 0.4024 1.4404 3.1788
## Rhat ESS
## (Intercept)-Canis_latrans 1.0101 595
## (Intercept)-Procyon_lotor 1.0266 442
## (Intercept)-Dasypus_novemcinctus 1.0051 755
## (Intercept)-Lynx_rufus 1.0056 296
## (Intercept)-Didelphis_virginiana 1.0082 672
## (Intercept)-Sylvilagus_floridanus 1.0045 867
## (Intercept)-Meleagris_gallopavo 1.0000 379
## (Intercept)-Sciurus_carolinensis 1.0063 700
## Tree_Density-Canis_latrans 1.0021 946
## Tree_Density-Procyon_lotor 1.0008 1806
## Tree_Density-Dasypus_novemcinctus 1.0015 517
## Tree_Density-Lynx_rufus 1.0020 607
## Tree_Density-Didelphis_virginiana 1.0069 925
## Tree_Density-Sylvilagus_floridanus 1.0012 726
## Tree_Density-Meleagris_gallopavo 1.0011 607
## Tree_Density-Sciurus_carolinensis 1.0012 883
## Avg_Canopy_Cover-Canis_latrans 1.0037 1255
## Avg_Canopy_Cover-Procyon_lotor 1.0035 1997
## Avg_Canopy_Cover-Dasypus_novemcinctus 1.0017 1669
## Avg_Canopy_Cover-Lynx_rufus 1.0413 681
## Avg_Canopy_Cover-Didelphis_virginiana 1.0115 580
## Avg_Canopy_Cover-Sylvilagus_floridanus 1.0031 395
## Avg_Canopy_Cover-Meleagris_gallopavo 1.0065 524
## Avg_Canopy_Cover-Sciurus_carolinensis 1.0100 665
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.7404 0.1842 -3.1185 -2.7369 -2.3903 1.0074
## (Intercept)-Procyon_lotor -2.3072 0.1430 -2.6038 -2.3032 -2.0457 1.0012
## (Intercept)-Dasypus_novemcinctus -1.7740 0.1613 -2.0956 -1.7677 -1.4675 1.0015
## (Intercept)-Lynx_rufus -3.6118 0.3406 -4.2782 -3.6112 -2.9640 1.0289
## (Intercept)-Didelphis_virginiana -2.6688 0.2861 -3.2429 -2.6650 -2.1268 1.0065
## (Intercept)-Sylvilagus_floridanus -3.1050 0.2510 -3.6056 -3.1014 -2.6236 1.0047
## (Intercept)-Meleagris_gallopavo -3.7952 0.4356 -4.6950 -3.7794 -2.9863 1.0049
## (Intercept)-Sciurus_carolinensis -2.7231 0.3076 -3.3430 -2.7166 -2.1321 1.0431
## shrub_cover-Canis_latrans -0.3033 0.2215 -0.7472 -0.3031 0.1328 1.0030
## shrub_cover-Procyon_lotor 0.2624 0.1587 -0.0440 0.2657 0.5644 1.0057
## shrub_cover-Dasypus_novemcinctus 0.8993 0.2956 0.3272 0.9020 1.4718 1.0057
## shrub_cover-Lynx_rufus -0.2230 0.3484 -0.8965 -0.2255 0.4509 1.0128
## shrub_cover-Didelphis_virginiana 1.0549 0.3629 0.3943 1.0405 1.8242 1.0003
## shrub_cover-Sylvilagus_floridanus 0.4396 0.3926 -0.3161 0.4365 1.2148 1.0074
## shrub_cover-Meleagris_gallopavo -0.5998 0.3999 -1.4447 -0.5918 0.1392 1.0099
## shrub_cover-Sciurus_carolinensis 0.9623 0.4138 0.1760 0.9480 1.8132 1.0211
## veg_height-Canis_latrans -0.5814 0.1931 -0.9819 -0.5742 -0.2215 1.0136
## veg_height-Procyon_lotor 0.3552 0.1212 0.1151 0.3542 0.5913 1.0010
## veg_height-Dasypus_novemcinctus 0.2643 0.1380 -0.0036 0.2614 0.5305 1.0083
## veg_height-Lynx_rufus 0.0909 0.2399 -0.3956 0.1026 0.5511 1.0354
## veg_height-Didelphis_virginiana 0.5239 0.2476 0.0702 0.5170 1.0554 1.0060
## veg_height-Sylvilagus_floridanus 0.1768 0.2367 -0.2906 0.1798 0.6385 1.0065
## veg_height-Meleagris_gallopavo -0.1685 0.3602 -0.9098 -0.1676 0.5419 1.0158
## veg_height-Sciurus_carolinensis 0.1387 0.2156 -0.2746 0.1376 0.5692 1.0177
## ESS
## (Intercept)-Canis_latrans 903
## (Intercept)-Procyon_lotor 1357
## (Intercept)-Dasypus_novemcinctus 1299
## (Intercept)-Lynx_rufus 270
## (Intercept)-Didelphis_virginiana 656
## (Intercept)-Sylvilagus_floridanus 688
## (Intercept)-Meleagris_gallopavo 294
## (Intercept)-Sciurus_carolinensis 593
## shrub_cover-Canis_latrans 894
## shrub_cover-Procyon_lotor 1582
## shrub_cover-Dasypus_novemcinctus 1125
## shrub_cover-Lynx_rufus 464
## shrub_cover-Didelphis_virginiana 668
## shrub_cover-Sylvilagus_floridanus 639
## shrub_cover-Meleagris_gallopavo 336
## shrub_cover-Sciurus_carolinensis 644
## veg_height-Canis_latrans 647
## veg_height-Procyon_lotor 1838
## veg_height-Dasypus_novemcinctus 1914
## veg_height-Lynx_rufus 771
## veg_height-Didelphis_virginiana 915
## veg_height-Sylvilagus_floridanus 1001
## veg_height-Meleagris_gallopavo 504
## veg_height-Sciurus_carolinensis 999
# Includes quadratic week covariate of detection and quadratic cogon for occupancy
ms_weekQ_cogonQ<- msPGOcc(
occ.formula = occ.cogon.quad,
det.formula = det.week.quad,
data = data_list,
n.samples = 5000,
n.thin = 2,
n.burn = 3000,
n.chains = 3,
n.report = 500,
)
## ----------------------------------------
## Preparing to run the model
## ----------------------------------------
## No prior specified for beta.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for alpha.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for tau.sq.beta.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for tau.sq.alpha.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for sigma.sq.psi.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## z is not specified in initial values.
## Setting initial values based on observed data
## beta.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## alpha.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## tau.sq.beta is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## tau.sq.alpha is not specified in initial values.
## Setting to initial values to random values between 0.5 and 10
## beta is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## alpha is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## sigma.sq.psi is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## ----------------------------------------
## Model description
## ----------------------------------------
## Multi-species Occupancy Model with Polya-Gamma latent
## variable fit with 32 sites and 8 species.
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## Source compiled with OpenMP support and model fit using 1 thread(s).
##
## ----------------------------------------
## Chain 1
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 2
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 3
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
summary(ms_weekQ_cogonQ)
##
## Call:
## msPGOcc(occ.formula = occ.cogon.quad, det.formula = det.week.quad,
## data = data_list, n.samples = 5000, n.report = 500, n.burn = 3000,
## n.thin = 2, n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.6263
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -1.1654 0.4015 -1.9576 -1.1588 -0.3797 1.0263 555
## Avg_Cogongrass_Cover -0.5661 0.3738 -1.3237 -0.5562 0.1682 1.0120 664
## I(Avg_Cogongrass_Cover^2) 0.7855 0.4036 0.1324 0.7378 1.7299 1.0302 397
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.5671 0.6298 0.0568 0.3812 2.2315 1.0051 1083
## Avg_Cogongrass_Cover 0.3708 0.4718 0.0374 0.2181 1.6390 1.0225 1132
## I(Avg_Cogongrass_Cover^2) 0.6748 1.1726 0.0430 0.3103 3.7261 1.0737 259
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 0.4731 0.4625 0.0518 0.337 1.7486 1.0399 303
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.4325 0.2809 -2.9688 -2.4352 -1.8664 1.0075 2586
## week 0.1744 0.2022 -0.2195 0.1746 0.5773 1.0068 1007
## I(week^2) -0.2157 0.1260 -0.4808 -0.2091 0.0128 1.0014 1030
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.5574 0.4764 0.1371 0.4224 1.8466 1.0027 1570
## week 0.2005 0.2038 0.0328 0.1416 0.7481 1.0098 919
## I(week^2) 0.0860 0.1036 0.0195 0.0594 0.2923 1.0178 339
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50%
## (Intercept)-Canis_latrans -0.8220 0.5680 -1.9451 -0.8233
## (Intercept)-Procyon_lotor -0.6052 0.5755 -1.7165 -0.6180
## (Intercept)-Dasypus_novemcinctus -1.2716 0.4857 -2.2582 -1.2559
## (Intercept)-Lynx_rufus -1.3018 0.5819 -2.5032 -1.3038
## (Intercept)-Didelphis_virginiana -1.5839 0.5608 -2.7872 -1.5394
## (Intercept)-Sylvilagus_floridanus -1.1395 0.5600 -2.2922 -1.1359
## (Intercept)-Meleagris_gallopavo -1.0196 0.5637 -2.1029 -1.0243
## (Intercept)-Sciurus_carolinensis -1.8153 0.6131 -3.1608 -1.7760
## Avg_Cogongrass_Cover-Canis_latrans -0.3890 0.4907 -1.2943 -0.3955
## Avg_Cogongrass_Cover-Procyon_lotor -0.5418 0.4899 -1.5025 -0.5331
## Avg_Cogongrass_Cover-Dasypus_novemcinctus -0.4145 0.4651 -1.3017 -0.4191
## Avg_Cogongrass_Cover-Lynx_rufus -0.4945 0.5368 -1.5618 -0.4905
## Avg_Cogongrass_Cover-Didelphis_virginiana -0.3084 0.5034 -1.2535 -0.3283
## Avg_Cogongrass_Cover-Sylvilagus_floridanus -0.9915 0.5804 -2.3184 -0.9326
## Avg_Cogongrass_Cover-Meleagris_gallopavo -0.8554 0.5577 -2.0951 -0.8198
## Avg_Cogongrass_Cover-Sciurus_carolinensis -0.5876 0.4932 -1.5735 -0.5678
## I(Avg_Cogongrass_Cover^2)-Canis_latrans 1.3812 0.9303 0.2375 1.1389
## I(Avg_Cogongrass_Cover^2)-Procyon_lotor 1.2809 0.8538 0.2459 1.0583
## I(Avg_Cogongrass_Cover^2)-Dasypus_novemcinctus 0.6392 0.3417 0.0016 0.6223
## I(Avg_Cogongrass_Cover^2)-Lynx_rufus 1.1607 0.5711 0.3011 1.0652
## I(Avg_Cogongrass_Cover^2)-Didelphis_virginiana 0.4252 0.3842 -0.3127 0.4279
## I(Avg_Cogongrass_Cover^2)-Sylvilagus_floridanus 0.6933 0.5590 -0.1490 0.6271
## I(Avg_Cogongrass_Cover^2)-Meleagris_gallopavo 0.1883 0.6159 -0.9967 0.1985
## I(Avg_Cogongrass_Cover^2)-Sciurus_carolinensis 0.7943 0.3786 0.1270 0.7691
## 97.5% Rhat ESS
## (Intercept)-Canis_latrans 0.2865 1.0173 617
## (Intercept)-Procyon_lotor 0.5786 1.0199 643
## (Intercept)-Dasypus_novemcinctus -0.3130 1.0034 1003
## (Intercept)-Lynx_rufus -0.2095 1.0139 710
## (Intercept)-Didelphis_virginiana -0.5727 1.0020 930
## (Intercept)-Sylvilagus_floridanus -0.0150 1.0169 858
## (Intercept)-Meleagris_gallopavo 0.1335 1.0038 870
## (Intercept)-Sciurus_carolinensis -0.7720 1.0024 731
## Avg_Cogongrass_Cover-Canis_latrans 0.6159 1.0015 1099
## Avg_Cogongrass_Cover-Procyon_lotor 0.4046 1.0071 911
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 0.5097 1.0031 1059
## Avg_Cogongrass_Cover-Lynx_rufus 0.5819 1.0044 1009
## Avg_Cogongrass_Cover-Didelphis_virginiana 0.7407 1.0036 988
## Avg_Cogongrass_Cover-Sylvilagus_floridanus -0.0003 1.0218 813
## Avg_Cogongrass_Cover-Meleagris_gallopavo 0.1263 1.0147 916
## Avg_Cogongrass_Cover-Sciurus_carolinensis 0.3191 1.0090 1045
## I(Avg_Cogongrass_Cover^2)-Canis_latrans 3.8923 1.0464 194
## I(Avg_Cogongrass_Cover^2)-Procyon_lotor 3.6373 1.1039 255
## I(Avg_Cogongrass_Cover^2)-Dasypus_novemcinctus 1.3475 1.0081 986
## I(Avg_Cogongrass_Cover^2)-Lynx_rufus 2.5384 1.0079 462
## I(Avg_Cogongrass_Cover^2)-Didelphis_virginiana 1.1801 1.0001 974
## I(Avg_Cogongrass_Cover^2)-Sylvilagus_floridanus 1.9488 1.0921 217
## I(Avg_Cogongrass_Cover^2)-Meleagris_gallopavo 1.3335 1.0350 241
## I(Avg_Cogongrass_Cover^2)-Sciurus_carolinensis 1.6168 1.0010 989
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.4654 0.1844 -2.8327 -2.4612 -2.1212 1.0186
## (Intercept)-Procyon_lotor -2.1872 0.1421 -2.4795 -2.1842 -1.9124 1.0003
## (Intercept)-Dasypus_novemcinctus -1.5032 0.1596 -1.8263 -1.4972 -1.2149 1.0000
## (Intercept)-Lynx_rufus -3.1362 0.2912 -3.7309 -3.1326 -2.5879 1.0051
## (Intercept)-Didelphis_virginiana -2.1880 0.2636 -2.7222 -2.1846 -1.6905 1.0006
## (Intercept)-Sylvilagus_floridanus -2.9964 0.2886 -3.5961 -2.9848 -2.4526 1.0212
## (Intercept)-Meleagris_gallopavo -3.1086 0.3331 -3.8051 -3.0912 -2.4943 1.0210
## (Intercept)-Sciurus_carolinensis -2.3319 0.2731 -2.8854 -2.3144 -1.8264 1.0030
## week-Canis_latrans 0.4514 0.2478 0.0040 0.4360 0.9807 1.0020
## week-Procyon_lotor 0.1585 0.1948 -0.2334 0.1631 0.5449 1.0029
## week-Dasypus_novemcinctus 0.0542 0.2118 -0.3623 0.0523 0.4770 1.0001
## week-Lynx_rufus 0.2704 0.2986 -0.2922 0.2514 0.9089 1.0013
## week-Didelphis_virginiana 0.0246 0.3140 -0.6205 0.0363 0.6127 1.0020
## week-Sylvilagus_floridanus 0.0523 0.3001 -0.5451 0.0555 0.6326 1.0015
## week-Meleagris_gallopavo -0.1099 0.3556 -0.9110 -0.0734 0.5149 1.0056
## week-Sciurus_carolinensis 0.5286 0.3354 -0.0664 0.5052 1.2346 1.0101
## I(week^2)-Canis_latrans -0.1958 0.1040 -0.4140 -0.1915 0.0006 1.0062
## I(week^2)-Procyon_lotor -0.1120 0.0852 -0.2801 -0.1120 0.0514 0.9996
## I(week^2)-Dasypus_novemcinctus -0.1492 0.1015 -0.3553 -0.1477 0.0427 1.0060
## I(week^2)-Lynx_rufus -0.2072 0.1467 -0.5079 -0.1988 0.0593 1.0060
## I(week^2)-Didelphis_virginiana -0.3595 0.2127 -0.8639 -0.3352 -0.0201 1.0204
## I(week^2)-Sylvilagus_floridanus -0.1635 0.1560 -0.4751 -0.1573 0.1100 1.0027
## I(week^2)-Meleagris_gallopavo -0.3773 0.2594 -0.9810 -0.3350 0.0132 1.0298
## I(week^2)-Sciurus_carolinensis -0.1905 0.1355 -0.4769 -0.1865 0.0612 1.0067
## ESS
## (Intercept)-Canis_latrans 1283
## (Intercept)-Procyon_lotor 1805
## (Intercept)-Dasypus_novemcinctus 2089
## (Intercept)-Lynx_rufus 671
## (Intercept)-Didelphis_virginiana 1252
## (Intercept)-Sylvilagus_floridanus 651
## (Intercept)-Meleagris_gallopavo 452
## (Intercept)-Sciurus_carolinensis 1218
## week-Canis_latrans 1148
## week-Procyon_lotor 1622
## week-Dasypus_novemcinctus 1513
## week-Lynx_rufus 1189
## week-Didelphis_virginiana 1091
## week-Sylvilagus_floridanus 1046
## week-Meleagris_gallopavo 501
## week-Sciurus_carolinensis 1138
## I(week^2)-Canis_latrans 1200
## I(week^2)-Procyon_lotor 1712
## I(week^2)-Dasypus_novemcinctus 1718
## I(week^2)-Lynx_rufus 953
## I(week^2)-Didelphis_virginiana 414
## I(week^2)-Sylvilagus_floridanus 656
## I(week^2)-Meleagris_gallopavo 119
## I(week^2)-Sciurus_carolinensis 1531
# Includes quadratic week and full covariates of detection and all covariates and coverage for occupancy
ms_fullQ_cover<- msPGOcc(
occ.formula = occ.cover,
det.formula = det.full.quad,
data = data_list,
n.samples = 5000,
n.thin = 2,
n.burn = 3000,
n.chains = 3,
n.report = 500,
)
## ----------------------------------------
## Preparing to run the model
## ----------------------------------------
## Warning in (function (..., row.names = NULL, check.rows = FALSE, check.names =
## TRUE, : row names were found from a short variable and have been discarded
## No prior specified for beta.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for alpha.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for tau.sq.beta.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for tau.sq.alpha.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for sigma.sq.psi.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## z is not specified in initial values.
## Setting initial values based on observed data
## beta.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## alpha.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## tau.sq.beta is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## tau.sq.alpha is not specified in initial values.
## Setting to initial values to random values between 0.5 and 10
## beta is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## alpha is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## sigma.sq.psi is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## ----------------------------------------
## Model description
## ----------------------------------------
## Multi-species Occupancy Model with Polya-Gamma latent
## variable fit with 32 sites and 8 species.
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## Source compiled with OpenMP support and model fit using 1 thread(s).
##
## ----------------------------------------
## Chain 1
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 2
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 3
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
summary(ms_fullQ_cover)
##
## Call:
## msPGOcc(occ.formula = occ.cover, det.formula = det.full.quad,
## data = data_list, n.samples = 5000, n.report = 500, n.burn = 3000,
## n.thin = 2, n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.7625
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -0.1616 0.4492 -1.0284 -0.1741 0.7660 1.0399 291
## Avg_Cogongrass_Cover -0.0025 0.3808 -0.8043 0.0070 0.7134 1.0018 715
## total_shrub_cover -0.9041 0.4860 -1.9700 -0.8610 -0.0167 1.0319 405
## avg_veg_height 0.1165 0.3942 -0.6678 0.1160 0.9181 1.0432 388
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.6472 0.8466 0.0546 0.3759 2.8923 1.1274 673
## Avg_Cogongrass_Cover 0.5082 0.6908 0.0456 0.2815 2.2855 1.0018 822
## total_shrub_cover 1.0646 1.4786 0.0767 0.6359 4.5354 1.0077 612
## avg_veg_height 0.4720 0.7921 0.0392 0.2290 2.6096 1.0379 366
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 0.989 1.04 0.0573 0.6648 3.9173 1.1159 170
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.6268 0.2930 -3.1960 -2.6343 -2.0321 1.0014 1584
## shrub_cover 0.5151 0.3336 -0.1568 0.5139 1.1908 1.0061 1117
## veg_height 0.0919 0.2045 -0.3030 0.0895 0.5191 1.0020 971
## week 0.1916 0.2018 -0.1975 0.1888 0.5755 1.0013 1196
## I(week^2) -0.2274 0.1232 -0.4879 -0.2225 -0.0073 1.0011 756
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.5715 0.5069 0.1204 0.4239 1.9263 1.0208 1518
## shrub_cover 0.7726 0.7222 0.1380 0.5855 2.5943 1.0500 760
## veg_height 0.2628 0.2464 0.0600 0.1943 0.9300 1.0102 1372
## week 0.2005 0.2703 0.0349 0.1354 0.7062 1.0318 1535
## I(week^2) 0.0809 0.0809 0.0192 0.0585 0.2800 1.0080 838
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50%
## (Intercept)-Canis_latrans 0.2450 0.6172 -0.8836 0.2064
## (Intercept)-Procyon_lotor 0.4002 0.6641 -0.7773 0.3573
## (Intercept)-Dasypus_novemcinctus -0.3170 0.5959 -1.4929 -0.3252
## (Intercept)-Lynx_rufus -0.1452 0.6307 -1.3683 -0.1703
## (Intercept)-Didelphis_virginiana -0.5944 0.6454 -1.8870 -0.5603
## (Intercept)-Sylvilagus_floridanus -0.0098 0.6870 -1.2689 -0.0383
## (Intercept)-Meleagris_gallopavo -0.3521 0.7224 -1.8286 -0.3624
## (Intercept)-Sciurus_carolinensis -0.5713 0.6770 -1.9918 -0.5372
## Avg_Cogongrass_Cover-Canis_latrans 0.3579 0.5155 -0.5702 0.3246
## Avg_Cogongrass_Cover-Procyon_lotor -0.0854 0.4738 -1.0318 -0.0734
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 0.1534 0.4705 -0.7589 0.1518
## Avg_Cogongrass_Cover-Lynx_rufus 0.3948 0.5540 -0.6100 0.3646
## Avg_Cogongrass_Cover-Didelphis_virginiana 0.1532 0.5183 -0.8081 0.1293
## Avg_Cogongrass_Cover-Sylvilagus_floridanus -0.4445 0.5991 -1.7691 -0.3865
## Avg_Cogongrass_Cover-Meleagris_gallopavo -0.5176 0.7542 -2.3258 -0.4209
## Avg_Cogongrass_Cover-Sciurus_carolinensis 0.0285 0.5087 -1.0300 0.0457
## total_shrub_cover-Canis_latrans 0.1577 0.6567 -0.9589 0.0826
## total_shrub_cover-Procyon_lotor -1.2303 0.5975 -2.6126 -1.1556
## total_shrub_cover-Dasypus_novemcinctus -0.5248 0.6857 -2.1487 -0.4472
## total_shrub_cover-Lynx_rufus -1.3166 0.7865 -3.1088 -1.2425
## total_shrub_cover-Didelphis_virginiana -0.9147 0.6556 -2.3567 -0.8593
## total_shrub_cover-Sylvilagus_floridanus -1.2687 0.8732 -3.1880 -1.1913
## total_shrub_cover-Meleagris_gallopavo -1.5431 0.8253 -3.4384 -1.4319
## total_shrub_cover-Sciurus_carolinensis -0.9720 0.7556 -2.7965 -0.8972
## avg_veg_height-Canis_latrans 0.1051 0.4763 -0.8157 0.1022
## avg_veg_height-Procyon_lotor 0.1501 0.4723 -0.7613 0.1484
## avg_veg_height-Dasypus_novemcinctus 0.3725 0.4990 -0.4568 0.3449
## avg_veg_height-Lynx_rufus 0.0635 0.6058 -1.1167 0.0634
## avg_veg_height-Didelphis_virginiana -0.0061 0.5361 -1.1421 -0.0011
## avg_veg_height-Sylvilagus_floridanus 0.0464 0.5460 -1.0552 0.0479
## avg_veg_height-Meleagris_gallopavo -0.2680 0.8418 -2.4038 -0.1552
## avg_veg_height-Sciurus_carolinensis 0.5272 0.5818 -0.4335 0.4697
## 97.5% Rhat ESS
## (Intercept)-Canis_latrans 1.5571 1.0516 480
## (Intercept)-Procyon_lotor 1.8765 1.0567 429
## (Intercept)-Dasypus_novemcinctus 0.9425 1.0316 396
## (Intercept)-Lynx_rufus 1.1089 1.0293 509
## (Intercept)-Didelphis_virginiana 0.6000 1.0586 346
## (Intercept)-Sylvilagus_floridanus 1.4846 1.0438 342
## (Intercept)-Meleagris_gallopavo 1.0947 1.0187 407
## (Intercept)-Sciurus_carolinensis 0.6864 1.0142 352
## Avg_Cogongrass_Cover-Canis_latrans 1.4905 1.0143 988
## Avg_Cogongrass_Cover-Procyon_lotor 0.8259 1.0046 967
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 1.1172 1.0020 1152
## Avg_Cogongrass_Cover-Lynx_rufus 1.5952 1.0009 1103
## Avg_Cogongrass_Cover-Didelphis_virginiana 1.2079 1.0078 978
## Avg_Cogongrass_Cover-Sylvilagus_floridanus 0.5698 1.0030 831
## Avg_Cogongrass_Cover-Meleagris_gallopavo 0.6449 1.0068 550
## Avg_Cogongrass_Cover-Sciurus_carolinensis 0.9985 1.0099 534
## total_shrub_cover-Canis_latrans 1.7463 1.0178 429
## total_shrub_cover-Procyon_lotor -0.2627 1.0256 297
## total_shrub_cover-Dasypus_novemcinctus 0.5750 1.0454 272
## total_shrub_cover-Lynx_rufus 0.0343 1.0201 402
## total_shrub_cover-Didelphis_virginiana 0.2568 1.0515 369
## total_shrub_cover-Sylvilagus_floridanus 0.2583 1.0528 202
## total_shrub_cover-Meleagris_gallopavo -0.1948 1.0116 336
## total_shrub_cover-Sciurus_carolinensis 0.2791 1.0522 288
## avg_veg_height-Canis_latrans 1.0894 1.0200 808
## avg_veg_height-Procyon_lotor 1.1184 1.0258 976
## avg_veg_height-Dasypus_novemcinctus 1.4911 1.0403 519
## avg_veg_height-Lynx_rufus 1.2628 1.0276 704
## avg_veg_height-Didelphis_virginiana 1.0321 1.0164 758
## avg_veg_height-Sylvilagus_floridanus 1.1677 1.0304 561
## avg_veg_height-Meleagris_gallopavo 1.0797 1.0191 309
## avg_veg_height-Sciurus_carolinensis 1.9158 1.0201 613
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.6133 0.2045 -3.0227 -2.6049 -2.2278 1.0144
## (Intercept)-Procyon_lotor -2.2085 0.1550 -2.5219 -2.2046 -1.9069 1.0002
## (Intercept)-Dasypus_novemcinctus -1.7506 0.2037 -2.1618 -1.7472 -1.3751 1.0089
## (Intercept)-Lynx_rufus -3.2780 0.3232 -3.9593 -3.2583 -2.6893 1.0233
## (Intercept)-Didelphis_virginiana -2.5729 0.3197 -3.1989 -2.5777 -1.9554 1.0355
## (Intercept)-Sylvilagus_floridanus -3.1258 0.2878 -3.6899 -3.1181 -2.5912 1.0437
## (Intercept)-Meleagris_gallopavo -3.3229 0.4922 -4.3093 -3.3037 -2.4033 1.0361
## (Intercept)-Sciurus_carolinensis -2.7137 0.3236 -3.3416 -2.7138 -2.0889 1.0006
## shrub_cover-Canis_latrans -0.2773 0.2470 -0.7634 -0.2783 0.1999 1.0111
## shrub_cover-Procyon_lotor 0.3274 0.1611 0.0056 0.3310 0.6270 1.0222
## shrub_cover-Dasypus_novemcinctus 1.1245 0.3703 0.4332 1.1142 1.8340 1.0154
## shrub_cover-Lynx_rufus 0.1734 0.3759 -0.6087 0.1821 0.8550 1.0271
## shrub_cover-Didelphis_virginiana 1.2758 0.4180 0.4987 1.2719 2.1159 1.0196
## shrub_cover-Sylvilagus_floridanus 0.7563 0.4585 -0.2474 0.7828 1.6058 1.0608
## shrub_cover-Meleagris_gallopavo -0.2582 0.4557 -1.1420 -0.2509 0.6153 1.0324
## shrub_cover-Sciurus_carolinensis 1.2329 0.4112 0.3924 1.2436 2.0003 1.0064
## veg_height-Canis_latrans -0.5859 0.1897 -0.9644 -0.5775 -0.2304 1.0233
## veg_height-Procyon_lotor 0.3473 0.1251 0.0938 0.3468 0.5932 1.0011
## veg_height-Dasypus_novemcinctus 0.2841 0.1423 0.0024 0.2823 0.5584 1.0095
## veg_height-Lynx_rufus 0.0517 0.2521 -0.4365 0.0546 0.5415 1.0066
## veg_height-Didelphis_virginiana 0.4606 0.2581 -0.0149 0.4490 1.0161 1.0042
## veg_height-Sylvilagus_floridanus 0.0815 0.2542 -0.4325 0.0775 0.5703 1.0113
## veg_height-Meleagris_gallopavo -0.0262 0.4602 -0.8666 -0.0420 0.9264 1.0307
## veg_height-Sciurus_carolinensis 0.1179 0.2265 -0.3189 0.1182 0.5734 1.0083
## week-Canis_latrans 0.4632 0.2477 0.0099 0.4591 0.9654 1.0197
## week-Procyon_lotor 0.1632 0.2001 -0.2142 0.1623 0.5528 1.0021
## week-Dasypus_novemcinctus 0.0652 0.2104 -0.3610 0.0679 0.4702 1.0003
## week-Lynx_rufus 0.2734 0.2904 -0.2596 0.2546 0.8654 1.0136
## week-Didelphis_virginiana 0.0668 0.3104 -0.5748 0.0842 0.6662 1.0044
## week-Sylvilagus_floridanus 0.0573 0.2899 -0.5141 0.0631 0.6245 1.0154
## week-Meleagris_gallopavo -0.0903 0.3379 -0.8150 -0.0712 0.5222 0.9999
## week-Sciurus_carolinensis 0.5426 0.3273 -0.0515 0.5270 1.2326 1.0019
## I(week^2)-Canis_latrans -0.1983 0.1054 -0.4046 -0.1951 -0.0054 1.0040
## I(week^2)-Procyon_lotor -0.1172 0.0880 -0.2946 -0.1149 0.0474 1.0099
## I(week^2)-Dasypus_novemcinctus -0.1526 0.1015 -0.3565 -0.1506 0.0423 1.0000
## I(week^2)-Lynx_rufus -0.2182 0.1457 -0.5175 -0.2131 0.0475 1.0143
## I(week^2)-Didelphis_virginiana -0.3839 0.2171 -0.9004 -0.3558 -0.0374 1.0061
## I(week^2)-Sylvilagus_floridanus -0.1682 0.1483 -0.4892 -0.1629 0.1075 1.0019
## I(week^2)-Meleagris_gallopavo -0.3828 0.2309 -0.9117 -0.3564 -0.0008 1.0239
## I(week^2)-Sciurus_carolinensis -0.1983 0.1388 -0.4834 -0.1962 0.0645 1.0067
## ESS
## (Intercept)-Canis_latrans 909
## (Intercept)-Procyon_lotor 1557
## (Intercept)-Dasypus_novemcinctus 519
## (Intercept)-Lynx_rufus 483
## (Intercept)-Didelphis_virginiana 471
## (Intercept)-Sylvilagus_floridanus 386
## (Intercept)-Meleagris_gallopavo 248
## (Intercept)-Sciurus_carolinensis 480
## shrub_cover-Canis_latrans 477
## shrub_cover-Procyon_lotor 1251
## shrub_cover-Dasypus_novemcinctus 323
## shrub_cover-Lynx_rufus 439
## shrub_cover-Didelphis_virginiana 337
## shrub_cover-Sylvilagus_floridanus 222
## shrub_cover-Meleagris_gallopavo 311
## shrub_cover-Sciurus_carolinensis 283
## veg_height-Canis_latrans 609
## veg_height-Procyon_lotor 1729
## veg_height-Dasypus_novemcinctus 1446
## veg_height-Lynx_rufus 716
## veg_height-Didelphis_virginiana 796
## veg_height-Sylvilagus_floridanus 412
## veg_height-Meleagris_gallopavo 402
## veg_height-Sciurus_carolinensis 966
## week-Canis_latrans 955
## week-Procyon_lotor 1710
## week-Dasypus_novemcinctus 1661
## week-Lynx_rufus 923
## week-Didelphis_virginiana 1027
## week-Sylvilagus_floridanus 949
## week-Meleagris_gallopavo 721
## week-Sciurus_carolinensis 946
## I(week^2)-Canis_latrans 1179
## I(week^2)-Procyon_lotor 1540
## I(week^2)-Dasypus_novemcinctus 1608
## I(week^2)-Lynx_rufus 749
## I(week^2)-Didelphis_virginiana 391
## I(week^2)-Sylvilagus_floridanus 708
## I(week^2)-Meleagris_gallopavo 320
## I(week^2)-Sciurus_carolinensis 1136
#Includes quadratic week and full covariates of detection and only foraging for occupancy
ms_fullQ_forage<- msPGOcc(
occ.formula = occ.forage,
det.formula = det.full.quad,
data = data_list,
n.samples = 5000,
n.thin = 2,
n.burn = 3000,
n.chains = 3,
n.report = 500,
)
## ----------------------------------------
## Preparing to run the model
## ----------------------------------------
## Warning in (function (..., row.names = NULL, check.rows = FALSE, check.names =
## TRUE, : row names were found from a short variable and have been discarded
## No prior specified for beta.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for alpha.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for tau.sq.beta.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for tau.sq.alpha.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for sigma.sq.psi.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## z is not specified in initial values.
## Setting initial values based on observed data
## beta.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## alpha.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## tau.sq.beta is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## tau.sq.alpha is not specified in initial values.
## Setting to initial values to random values between 0.5 and 10
## beta is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## alpha is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## sigma.sq.psi is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## ----------------------------------------
## Model description
## ----------------------------------------
## Multi-species Occupancy Model with Polya-Gamma latent
## variable fit with 32 sites and 8 species.
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## Source compiled with OpenMP support and model fit using 1 thread(s).
##
## ----------------------------------------
## Chain 1
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 2
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 3
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
summary(ms_fullQ_forage)
##
## Call:
## msPGOcc(occ.formula = occ.forage, det.formula = det.full.quad,
## data = data_list, n.samples = 5000, n.report = 500, n.burn = 3000,
## n.thin = 2, n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.724
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -0.3849 0.3854 -1.0782 -0.3875 0.4139 1.0024 632
## Veg_shannon_index 0.3720 0.2726 -0.1592 0.3762 0.8929 1.0041 973
## Avg_Cogongrass_Cover 0.3407 0.3026 -0.2821 0.3435 0.9191 1.0145 793
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.6619 1.0465 0.0565 0.3852 2.8157 1.1711 345
## Veg_shannon_index 0.2783 0.3386 0.0368 0.1731 1.1973 1.0335 1079
## Avg_Cogongrass_Cover 0.3595 0.4454 0.0391 0.2207 1.5407 1.0206 918
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 0.6988 0.6245 0.0695 0.5322 2.3553 1.0075 246
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.5903 0.3216 -3.2064 -2.6003 -1.9312 0.9998 2335
## shrub_cover 0.2628 0.3152 -0.3708 0.2653 0.8706 1.0119 1525
## veg_height 0.0629 0.2055 -0.3600 0.0642 0.4596 1.0054 1567
## week 0.1905 0.2027 -0.2147 0.1902 0.6055 1.0026 1186
## I(week^2) -0.2143 0.1169 -0.4503 -0.2141 0.0042 1.0065 1121
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.7589 0.7423 0.1552 0.5608 2.7344 1.0052 778
## shrub_cover 0.6779 0.6320 0.1381 0.5059 2.1992 1.0005 1412
## veg_height 0.2624 0.2238 0.0581 0.1993 0.8618 1.0266 1657
## week 0.1947 0.2111 0.0329 0.1375 0.7116 1.0760 1225
## I(week^2) 0.0766 0.0659 0.0189 0.0565 0.2489 1.0154 1375
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50%
## (Intercept)-Canis_latrans 0.0094 0.5419 -0.9959 0.0029
## (Intercept)-Procyon_lotor 0.1480 0.5606 -0.8984 0.1333
## (Intercept)-Dasypus_novemcinctus -0.5577 0.4538 -1.4471 -0.5598
## (Intercept)-Lynx_rufus -0.2379 0.7044 -1.3686 -0.2920
## (Intercept)-Didelphis_virginiana -0.9567 0.5344 -2.1407 -0.9095
## (Intercept)-Sylvilagus_floridanus -0.4471 0.5122 -1.4375 -0.4622
## (Intercept)-Meleagris_gallopavo -0.1783 0.7575 -1.3709 -0.2489
## (Intercept)-Sciurus_carolinensis -0.9385 0.5374 -2.0984 -0.8985
## Veg_shannon_index-Canis_latrans 0.6310 0.3966 -0.0708 0.6127
## Veg_shannon_index-Procyon_lotor 0.4633 0.3560 -0.2053 0.4468
## Veg_shannon_index-Dasypus_novemcinctus 0.1999 0.3454 -0.5119 0.2108
## Veg_shannon_index-Lynx_rufus 0.2174 0.4631 -0.7770 0.2508
## Veg_shannon_index-Didelphis_virginiana 0.4922 0.3908 -0.2323 0.4802
## Veg_shannon_index-Sylvilagus_floridanus 0.4381 0.4039 -0.3016 0.4192
## Veg_shannon_index-Meleagris_gallopavo 0.5070 0.4532 -0.3396 0.4832
## Veg_shannon_index-Sciurus_carolinensis 0.0176 0.3999 -0.7962 0.0457
## Avg_Cogongrass_Cover-Canis_latrans 0.6117 0.4079 -0.1086 0.5851
## Avg_Cogongrass_Cover-Procyon_lotor 0.3811 0.3798 -0.3316 0.3671
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 0.4657 0.3530 -0.2042 0.4643
## Avg_Cogongrass_Cover-Lynx_rufus 0.6002 0.4240 -0.1689 0.5764
## Avg_Cogongrass_Cover-Didelphis_virginiana 0.4452 0.3770 -0.3183 0.4443
## Avg_Cogongrass_Cover-Sylvilagus_floridanus -0.0956 0.4782 -1.1556 -0.0578
## Avg_Cogongrass_Cover-Meleagris_gallopavo -0.0717 0.6281 -1.4844 -0.0071
## Avg_Cogongrass_Cover-Sciurus_carolinensis 0.4349 0.3737 -0.2622 0.4275
## 97.5% Rhat ESS
## (Intercept)-Canis_latrans 1.0990 1.0134 629
## (Intercept)-Procyon_lotor 1.3263 1.0006 453
## (Intercept)-Dasypus_novemcinctus 0.3581 1.0061 1229
## (Intercept)-Lynx_rufus 1.1875 1.0442 330
## (Intercept)-Didelphis_virginiana -0.0117 1.0029 978
## (Intercept)-Sylvilagus_floridanus 0.5462 1.0028 950
## (Intercept)-Meleagris_gallopavo 1.4103 1.0366 277
## (Intercept)-Sciurus_carolinensis -0.0029 1.0056 1053
## Veg_shannon_index-Canis_latrans 1.4928 1.0002 1162
## Veg_shannon_index-Procyon_lotor 1.2022 1.0059 1257
## Veg_shannon_index-Dasypus_novemcinctus 0.8503 1.0016 1776
## Veg_shannon_index-Lynx_rufus 1.0622 1.0043 946
## Veg_shannon_index-Didelphis_virginiana 1.3172 1.0077 1560
## Veg_shannon_index-Sylvilagus_floridanus 1.2717 1.0078 1135
## Veg_shannon_index-Meleagris_gallopavo 1.4913 1.0019 1318
## Veg_shannon_index-Sciurus_carolinensis 0.7424 1.0015 1514
## Avg_Cogongrass_Cover-Canis_latrans 1.5163 1.0057 1434
## Avg_Cogongrass_Cover-Procyon_lotor 1.1624 1.0044 1489
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 1.1694 1.0001 1841
## Avg_Cogongrass_Cover-Lynx_rufus 1.5233 1.0009 1307
## Avg_Cogongrass_Cover-Didelphis_virginiana 1.2056 1.0056 1724
## Avg_Cogongrass_Cover-Sylvilagus_floridanus 0.7444 1.0011 969
## Avg_Cogongrass_Cover-Meleagris_gallopavo 0.9936 1.0146 549
## Avg_Cogongrass_Cover-Sciurus_carolinensis 1.2076 1.0029 1743
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.5681 0.1958 -2.9535 -2.5640 -2.1955 1.0020
## (Intercept)-Procyon_lotor -2.2047 0.1627 -2.5434 -2.1975 -1.8975 1.0049
## (Intercept)-Dasypus_novemcinctus -1.6480 0.1837 -2.0190 -1.6413 -1.3042 1.0093
## (Intercept)-Lynx_rufus -3.3817 0.3548 -4.1318 -3.3681 -2.7432 1.0337
## (Intercept)-Didelphis_virginiana -2.4043 0.2975 -2.9989 -2.3944 -1.8382 1.0016
## (Intercept)-Sylvilagus_floridanus -3.0386 0.3015 -3.6591 -3.0259 -2.4774 1.0081
## (Intercept)-Meleagris_gallopavo -3.6516 0.4859 -4.6595 -3.6305 -2.6964 1.0028
## (Intercept)-Sciurus_carolinensis -2.5124 0.3207 -3.1642 -2.5063 -1.9048 1.0050
## shrub_cover-Canis_latrans -0.2900 0.2083 -0.6772 -0.2929 0.1247 1.0100
## shrub_cover-Procyon_lotor 0.2435 0.1712 -0.1180 0.2456 0.5714 1.0056
## shrub_cover-Dasypus_novemcinctus 0.8749 0.3068 0.2846 0.8732 1.4735 1.0092
## shrub_cover-Lynx_rufus -0.1905 0.3521 -0.8518 -0.1895 0.5196 1.0518
## shrub_cover-Didelphis_virginiana 0.9683 0.3613 0.3060 0.9478 1.6915 1.0065
## shrub_cover-Sylvilagus_floridanus 0.2551 0.4242 -0.5594 0.2448 1.0913 1.0032
## shrub_cover-Meleagris_gallopavo -0.6159 0.4084 -1.4321 -0.6013 0.1851 1.0090
## shrub_cover-Sciurus_carolinensis 0.8832 0.4213 0.0634 0.8716 1.7297 1.0093
## veg_height-Canis_latrans -0.5890 0.1883 -0.9628 -0.5832 -0.2397 1.0032
## veg_height-Procyon_lotor 0.3400 0.1237 0.1065 0.3408 0.5841 1.0033
## veg_height-Dasypus_novemcinctus 0.2539 0.1362 -0.0117 0.2509 0.5291 1.0033
## veg_height-Lynx_rufus 0.0009 0.2554 -0.5258 0.0114 0.4823 1.0562
## veg_height-Didelphis_virginiana 0.4642 0.2462 -0.0038 0.4606 0.9619 1.0062
## veg_height-Sylvilagus_floridanus 0.1651 0.2401 -0.3249 0.1691 0.6262 1.0114
## veg_height-Meleagris_gallopavo -0.1702 0.4017 -0.9931 -0.1640 0.6246 1.0245
## veg_height-Sciurus_carolinensis 0.0742 0.2128 -0.3394 0.0657 0.5005 1.0004
## week-Canis_latrans 0.4577 0.2496 0.0029 0.4513 0.9834 1.0019
## week-Procyon_lotor 0.1573 0.2001 -0.2415 0.1543 0.5507 1.0042
## week-Dasypus_novemcinctus 0.0665 0.2091 -0.3479 0.0659 0.4781 1.0017
## week-Lynx_rufus 0.2712 0.2916 -0.2892 0.2604 0.8546 1.0015
## week-Didelphis_virginiana 0.0381 0.3090 -0.6143 0.0490 0.6069 1.0010
## week-Sylvilagus_floridanus 0.0508 0.3029 -0.5755 0.0581 0.6498 1.0084
## week-Meleagris_gallopavo -0.0671 0.3356 -0.7951 -0.0526 0.5477 1.0007
## week-Sciurus_carolinensis 0.5422 0.3302 -0.0450 0.5254 1.2387 1.0026
## I(week^2)-Canis_latrans -0.1990 0.1030 -0.4088 -0.1970 -0.0073 1.0041
## I(week^2)-Procyon_lotor -0.1127 0.0890 -0.2857 -0.1139 0.0668 1.0015
## I(week^2)-Dasypus_novemcinctus -0.1563 0.1014 -0.3620 -0.1545 0.0371 1.0003
## I(week^2)-Lynx_rufus -0.2025 0.1424 -0.4966 -0.1934 0.0496 1.0042
## I(week^2)-Didelphis_virginiana -0.3587 0.2017 -0.8014 -0.3386 -0.0188 1.0226
## I(week^2)-Sylvilagus_floridanus -0.1620 0.1505 -0.4847 -0.1591 0.1237 1.0057
## I(week^2)-Meleagris_gallopavo -0.3599 0.2162 -0.8649 -0.3335 0.0028 1.0290
## I(week^2)-Sciurus_carolinensis -0.1943 0.1365 -0.4599 -0.1920 0.0677 1.0026
## ESS
## (Intercept)-Canis_latrans 1253
## (Intercept)-Procyon_lotor 1353
## (Intercept)-Dasypus_novemcinctus 1284
## (Intercept)-Lynx_rufus 371
## (Intercept)-Didelphis_virginiana 1040
## (Intercept)-Sylvilagus_floridanus 647
## (Intercept)-Meleagris_gallopavo 246
## (Intercept)-Sciurus_carolinensis 690
## shrub_cover-Canis_latrans 1006
## shrub_cover-Procyon_lotor 1356
## shrub_cover-Dasypus_novemcinctus 1144
## shrub_cover-Lynx_rufus 517
## shrub_cover-Didelphis_virginiana 776
## shrub_cover-Sylvilagus_floridanus 533
## shrub_cover-Meleagris_gallopavo 296
## shrub_cover-Sciurus_carolinensis 660
## veg_height-Canis_latrans 1077
## veg_height-Procyon_lotor 1640
## veg_height-Dasypus_novemcinctus 1943
## veg_height-Lynx_rufus 763
## veg_height-Didelphis_virginiana 1067
## veg_height-Sylvilagus_floridanus 792
## veg_height-Meleagris_gallopavo 459
## veg_height-Sciurus_carolinensis 1252
## week-Canis_latrans 1287
## week-Procyon_lotor 1476
## week-Dasypus_novemcinctus 1849
## week-Lynx_rufus 996
## week-Didelphis_virginiana 881
## week-Sylvilagus_floridanus 1037
## week-Meleagris_gallopavo 791
## week-Sciurus_carolinensis 1079
## I(week^2)-Canis_latrans 1299
## I(week^2)-Procyon_lotor 1483
## I(week^2)-Dasypus_novemcinctus 1701
## I(week^2)-Lynx_rufus 840
## I(week^2)-Didelphis_virginiana 571
## I(week^2)-Sylvilagus_floridanus 695
## I(week^2)-Meleagris_gallopavo 275
## I(week^2)-Sciurus_carolinensis 1405
# Includes quadratic week and full covariates of detection and all covariates and quadratic cogon for occupancy
ms_fullQ_fullQ<- msPGOcc(
occ.formula = occ.full.quad,
det.formula = det.full.quad,
data = data_list,
n.samples = 5000,
n.thin = 2,
n.burn = 3000,
n.chains = 3,
n.report = 500,
)
## ----------------------------------------
## Preparing to run the model
## ----------------------------------------
## Warning in (function (..., row.names = NULL, check.rows = FALSE, check.names =
## TRUE, : row names were found from a short variable and have been discarded
## No prior specified for beta.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for alpha.comm.normal.
## Setting prior mean to 0 and prior variance to 2.72
## No prior specified for tau.sq.beta.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for tau.sq.alpha.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## No prior specified for sigma.sq.psi.ig.
## Setting prior shape to 0.1 and prior scale to 0.1
## z is not specified in initial values.
## Setting initial values based on observed data
## beta.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## alpha.comm is not specified in initial values.
## Setting initial values to random values from the prior distribution
## tau.sq.beta is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## tau.sq.alpha is not specified in initial values.
## Setting to initial values to random values between 0.5 and 10
## beta is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## alpha is not specified in initial values.
## Setting initial values to random values from the community-level normal distribution
## sigma.sq.psi is not specified in initial values.
## Setting initial values to random values between 0.5 and 10
## ----------------------------------------
## Model description
## ----------------------------------------
## Multi-species Occupancy Model with Polya-Gamma latent
## variable fit with 32 sites and 8 species.
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## Source compiled with OpenMP support and model fit using 1 thread(s).
##
## ----------------------------------------
## Chain 1
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 2
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
## ----------------------------------------
## Chain 3
## ----------------------------------------
## Sampling ...
## Sampled: 500 of 5000, 10.00%
## -------------------------------------------------
## Sampled: 1000 of 5000, 20.00%
## -------------------------------------------------
## Sampled: 1500 of 5000, 30.00%
## -------------------------------------------------
## Sampled: 2000 of 5000, 40.00%
## -------------------------------------------------
## Sampled: 2500 of 5000, 50.00%
## -------------------------------------------------
## Sampled: 3000 of 5000, 60.00%
## -------------------------------------------------
## Sampled: 3500 of 5000, 70.00%
## -------------------------------------------------
## Sampled: 4000 of 5000, 80.00%
## -------------------------------------------------
## Sampled: 4500 of 5000, 90.00%
## -------------------------------------------------
## Sampled: 5000 of 5000, 100.00%
summary(ms_fullQ_fullQ)
##
## Call:
## msPGOcc(occ.formula = occ.full.quad, det.formula = det.full.quad,
## data = data_list, n.samples = 5000, n.report = 500, n.burn = 3000,
## n.thin = 2, n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.7537
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -1.7235 0.7095 -3.1375 -1.7110 -0.2918 1.0562 275
## Cogon_Patch_Size 0.1484 0.6995 -1.2852 0.1599 1.5669 1.0123 405
## Veg_shannon_index 0.9525 0.5013 0.0492 0.9306 2.0148 1.0693 316
## total_shrub_cover -1.1314 0.6757 -2.5946 -1.0711 0.0498 1.1126 273
## Avg_Cogongrass_Cover -0.0762 0.9755 -1.9276 -0.0692 1.8944 1.0540 136
## Tree_Density -2.0317 0.8634 -3.7568 -2.0181 -0.3455 1.0124 333
## Avg_Canopy_Cover 1.8308 0.7570 0.3941 1.7769 3.4165 1.0140 590
## I(Avg_Cogongrass_Cover^2) 1.3546 0.6555 0.0923 1.3345 2.7259 1.0135 354
## avg_veg_height -0.0525 0.5395 -1.1276 -0.0395 1.0308 1.0378 310
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 1.7146 2.6566 0.0626 0.8897 8.3081 1.1264 324
## Cogon_Patch_Size 2.5519 4.2385 0.0705 1.2007 13.3977 1.1546 371
## Veg_shannon_index 0.7461 1.4228 0.0477 0.3601 3.6363 1.3552 237
## total_shrub_cover 2.1827 3.2039 0.0900 1.1690 11.0854 1.0448 246
## Avg_Cogongrass_Cover 1.2640 2.1029 0.0519 0.5789 6.6759 1.0083 801
## Tree_Density 4.3451 11.7271 0.0640 1.2593 27.1744 1.3055 164
## Avg_Canopy_Cover 4.5420 8.5621 0.1757 2.2387 22.9439 1.1174 130
## I(Avg_Cogongrass_Cover^2) 2.1214 3.5226 0.0734 0.9972 11.4620 1.3056 218
## avg_veg_height 0.7750 1.3112 0.0459 0.3702 4.1031 1.0200 547
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 1.6082 2.1146 0.074 0.8259 7.8389 1.0819 93
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.6239 0.3024 -3.2187 -2.6239 -2.0310 1.0008 1500
## shrub_cover 0.4503 0.3198 -0.1750 0.4470 1.0936 1.0026 949
## veg_height 0.1386 0.2007 -0.2628 0.1373 0.5290 1.0024 921
## week 0.1793 0.2204 -0.2484 0.1792 0.6080 1.0060 1262
## I(week^2) -0.2207 0.1250 -0.4685 -0.2157 0.0132 1.0092 908
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.6408 0.5429 0.1470 0.4864 1.9991 1.0049 773
## shrub_cover 0.6972 0.6079 0.1326 0.5349 2.2211 1.0034 763
## veg_height 0.2582 0.2244 0.0559 0.1946 0.8238 1.0006 1854
## week 0.2232 0.2486 0.0374 0.1515 0.8647 1.0050 981
## I(week^2) 0.0851 0.0956 0.0205 0.0599 0.2917 1.0685 444
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50%
## (Intercept)-Canis_latrans -1.3693 0.9740 -3.2017 -1.4028
## (Intercept)-Procyon_lotor -1.0115 0.9598 -2.8670 -1.0470
## (Intercept)-Dasypus_novemcinctus -2.0385 0.9381 -4.0088 -1.9553
## (Intercept)-Lynx_rufus -1.4316 1.1363 -3.3866 -1.5315
## (Intercept)-Didelphis_virginiana -2.5408 1.0903 -4.8961 -2.4554
## (Intercept)-Sylvilagus_floridanus -1.8667 0.9931 -3.9616 -1.8240
## (Intercept)-Meleagris_gallopavo -1.7028 1.1326 -3.9721 -1.7324
## (Intercept)-Sciurus_carolinensis -2.7890 1.2173 -5.6447 -2.6544
## Cogon_Patch_Size-Canis_latrans 1.3738 1.2656 -0.4572 1.1073
## Cogon_Patch_Size-Procyon_lotor -0.4097 0.8156 -2.1317 -0.3821
## Cogon_Patch_Size-Dasypus_novemcinctus 0.1621 0.8520 -1.4422 0.1270
## Cogon_Patch_Size-Lynx_rufus -0.0301 1.3976 -2.7805 -0.0121
## Cogon_Patch_Size-Didelphis_virginiana 1.2883 1.0039 -0.3234 1.1544
## Cogon_Patch_Size-Sylvilagus_floridanus -0.9861 1.4622 -4.7525 -0.7234
## Cogon_Patch_Size-Meleagris_gallopavo 0.4691 1.3213 -1.6356 0.3199
## Cogon_Patch_Size-Sciurus_carolinensis -0.5412 1.1668 -3.2404 -0.3993
## Veg_shannon_index-Canis_latrans 1.3091 0.7118 0.1185 1.2321
## Veg_shannon_index-Procyon_lotor 1.1699 0.6261 0.0945 1.1114
## Veg_shannon_index-Dasypus_novemcinctus 0.5918 0.6250 -0.6939 0.6053
## Veg_shannon_index-Lynx_rufus 0.9348 0.8807 -0.7520 0.9286
## Veg_shannon_index-Didelphis_virginiana 1.1716 0.7392 -0.0662 1.0952
## Veg_shannon_index-Sylvilagus_floridanus 0.9929 0.7222 -0.3873 0.9644
## Veg_shannon_index-Meleagris_gallopavo 1.2823 0.8398 -0.1169 1.1831
## Veg_shannon_index-Sciurus_carolinensis 0.3850 0.7940 -1.4078 0.4640
## total_shrub_cover-Canis_latrans 0.1184 0.8531 -1.2835 0.0294
## total_shrub_cover-Procyon_lotor -1.5117 0.7185 -3.0928 -1.4485
## total_shrub_cover-Dasypus_novemcinctus -0.6292 1.0214 -2.7340 -0.5020
## total_shrub_cover-Lynx_rufus -1.8371 1.2994 -5.0248 -1.6138
## total_shrub_cover-Didelphis_virginiana -1.4825 1.1710 -4.3404 -1.2758
## total_shrub_cover-Sylvilagus_floridanus -1.1820 1.2515 -4.1663 -1.0377
## total_shrub_cover-Meleagris_gallopavo -2.4928 1.4403 -5.8293 -2.2640
## total_shrub_cover-Sciurus_carolinensis -1.1304 1.1742 -3.8090 -1.0041
## Avg_Cogongrass_Cover-Canis_latrans 0.0187 1.2152 -2.3566 -0.0112
## Avg_Cogongrass_Cover-Procyon_lotor -0.1798 1.2189 -2.5596 -0.1588
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 0.5147 1.3000 -1.8463 0.4530
## Avg_Cogongrass_Cover-Lynx_rufus -0.0150 1.3104 -2.4567 -0.0165
## Avg_Cogongrass_Cover-Didelphis_virginiana 0.1155 1.2461 -2.3125 0.1130
## Avg_Cogongrass_Cover-Sylvilagus_floridanus -0.7083 1.3198 -3.4634 -0.6033
## Avg_Cogongrass_Cover-Meleagris_gallopavo -0.3646 1.3833 -3.2835 -0.2576
## Avg_Cogongrass_Cover-Sciurus_carolinensis -0.0188 1.2522 -2.4223 -0.0263
## Tree_Density-Canis_latrans -2.9939 1.5377 -6.8487 -2.7292
## Tree_Density-Procyon_lotor -2.1469 1.0132 -4.2898 -2.0801
## Tree_Density-Dasypus_novemcinctus -3.8875 2.4497 -10.3282 -3.2664
## Tree_Density-Lynx_rufus -0.8563 1.6912 -3.5803 -1.1157
## Tree_Density-Didelphis_virginiana -2.1226 1.4243 -5.2245 -2.0444
## Tree_Density-Sylvilagus_floridanus -2.5946 1.5551 -6.6434 -2.3872
## Tree_Density-Meleagris_gallopavo -2.2548 1.5152 -5.5715 -2.1407
## Tree_Density-Sciurus_carolinensis -2.2318 1.5344 -5.4869 -2.1796
## Avg_Canopy_Cover-Canis_latrans 0.1162 0.6797 -1.2548 0.1245
## Avg_Canopy_Cover-Procyon_lotor 1.5635 0.7944 0.1583 1.5011
## Avg_Canopy_Cover-Dasypus_novemcinctus 2.2666 1.0471 0.7411 2.0950
## Avg_Canopy_Cover-Lynx_rufus 0.9783 1.3288 -1.5718 0.9308
## Avg_Canopy_Cover-Didelphis_virginiana 3.1933 1.5829 1.0913 2.8654
## Avg_Canopy_Cover-Sylvilagus_floridanus 3.8551 1.9364 1.2305 3.5174
## Avg_Canopy_Cover-Meleagris_gallopavo 2.4715 1.5880 0.4191 2.1566
## Avg_Canopy_Cover-Sciurus_carolinensis 3.0776 1.8343 0.9380 2.6928
## I(Avg_Cogongrass_Cover^2)-Canis_latrans 2.2581 1.2370 0.5636 2.0326
## I(Avg_Cogongrass_Cover^2)-Procyon_lotor 2.2308 1.1146 0.5641 2.0632
## I(Avg_Cogongrass_Cover^2)-Dasypus_novemcinctus 1.3096 0.7442 0.0163 1.2575
## I(Avg_Cogongrass_Cover^2)-Lynx_rufus 2.4455 1.3518 0.5501 2.1935
## I(Avg_Cogongrass_Cover^2)-Didelphis_virginiana 0.7744 0.7290 -0.6793 0.7753
## I(Avg_Cogongrass_Cover^2)-Sylvilagus_floridanus 1.0311 0.7939 -0.4040 0.9929
## I(Avg_Cogongrass_Cover^2)-Meleagris_gallopavo 0.2554 1.3269 -2.5803 0.3369
## I(Avg_Cogongrass_Cover^2)-Sciurus_carolinensis 1.4284 0.8019 0.0196 1.3749
## avg_veg_height-Canis_latrans -0.2228 0.6620 -1.5677 -0.2058
## avg_veg_height-Procyon_lotor 0.0710 0.6665 -1.2534 0.0761
## avg_veg_height-Dasypus_novemcinctus 0.3333 0.7093 -0.9300 0.2824
## avg_veg_height-Lynx_rufus -0.4372 0.9553 -2.7051 -0.3192
## avg_veg_height-Didelphis_virginiana -0.1991 0.7465 -1.7851 -0.1825
## avg_veg_height-Sylvilagus_floridanus -0.2438 0.7885 -1.9673 -0.1874
## avg_veg_height-Meleagris_gallopavo -0.1246 0.9053 -1.9965 -0.1035
## avg_veg_height-Sciurus_carolinensis 0.3879 0.8164 -0.9967 0.2973
## 97.5% Rhat ESS
## (Intercept)-Canis_latrans 0.6752 1.0637 321
## (Intercept)-Procyon_lotor 0.9568 1.1194 281
## (Intercept)-Dasypus_novemcinctus -0.3966 1.0114 366
## (Intercept)-Lynx_rufus 1.2398 1.0847 260
## (Intercept)-Didelphis_virginiana -0.6983 1.0394 342
## (Intercept)-Sylvilagus_floridanus -0.0113 1.0207 328
## (Intercept)-Meleagris_gallopavo 0.6589 1.1115 286
## (Intercept)-Sciurus_carolinensis -0.8400 1.0292 334
## Cogon_Patch_Size-Canis_latrans 4.5542 1.0251 396
## Cogon_Patch_Size-Procyon_lotor 1.0423 1.0604 267
## Cogon_Patch_Size-Dasypus_novemcinctus 1.9636 1.0053 457
## Cogon_Patch_Size-Lynx_rufus 2.7051 1.0681 327
## Cogon_Patch_Size-Didelphis_virginiana 3.5828 1.0393 426
## Cogon_Patch_Size-Sylvilagus_floridanus 1.1881 1.1501 273
## Cogon_Patch_Size-Meleagris_gallopavo 3.4105 1.0779 301
## Cogon_Patch_Size-Sciurus_carolinensis 1.4509 1.0552 316
## Veg_shannon_index-Canis_latrans 2.9752 1.0912 173
## Veg_shannon_index-Procyon_lotor 2.6297 1.0816 238
## Veg_shannon_index-Dasypus_novemcinctus 1.7689 1.0200 405
## Veg_shannon_index-Lynx_rufus 2.7288 1.0594 370
## Veg_shannon_index-Didelphis_virginiana 2.8751 1.1013 286
## Veg_shannon_index-Sylvilagus_floridanus 2.5208 1.0184 438
## Veg_shannon_index-Meleagris_gallopavo 3.3078 1.0834 379
## Veg_shannon_index-Sciurus_carolinensis 1.7691 1.0193 448
## total_shrub_cover-Canis_latrans 2.0810 1.0213 390
## total_shrub_cover-Procyon_lotor -0.2949 1.0455 545
## total_shrub_cover-Dasypus_novemcinctus 0.9506 1.0543 316
## total_shrub_cover-Lynx_rufus 0.0887 1.0605 144
## total_shrub_cover-Didelphis_virginiana 0.2425 1.1086 197
## total_shrub_cover-Sylvilagus_floridanus 0.7968 1.0616 298
## total_shrub_cover-Meleagris_gallopavo -0.3317 1.1183 168
## total_shrub_cover-Sciurus_carolinensis 0.9201 1.1630 257
## Avg_Cogongrass_Cover-Canis_latrans 2.4826 1.0222 228
## Avg_Cogongrass_Cover-Procyon_lotor 2.2370 1.0475 156
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 3.3867 1.0368 226
## Avg_Cogongrass_Cover-Lynx_rufus 2.6573 1.0278 185
## Avg_Cogongrass_Cover-Didelphis_virginiana 2.7255 1.0075 236
## Avg_Cogongrass_Cover-Sylvilagus_floridanus 1.6407 1.0438 274
## Avg_Cogongrass_Cover-Meleagris_gallopavo 2.1358 1.0288 178
## Avg_Cogongrass_Cover-Sciurus_carolinensis 2.4303 1.0240 206
## Tree_Density-Canis_latrans -0.7149 1.1655 281
## Tree_Density-Procyon_lotor -0.3498 1.0479 422
## Tree_Density-Dasypus_novemcinctus -1.2369 1.2484 113
## Tree_Density-Lynx_rufus 3.2693 1.1204 197
## Tree_Density-Didelphis_virginiana 0.6075 1.0502 223
## Tree_Density-Sylvilagus_floridanus -0.1159 1.1181 185
## Tree_Density-Meleagris_gallopavo 0.5525 1.0180 253
## Tree_Density-Sciurus_carolinensis 0.8009 1.0617 270
## Avg_Canopy_Cover-Canis_latrans 1.4395 1.0188 562
## Avg_Canopy_Cover-Procyon_lotor 3.2829 1.0103 442
## Avg_Canopy_Cover-Dasypus_novemcinctus 4.8412 1.1247 181
## Avg_Canopy_Cover-Lynx_rufus 3.8247 1.0097 173
## Avg_Canopy_Cover-Didelphis_virginiana 7.4448 1.0325 154
## Avg_Canopy_Cover-Sylvilagus_floridanus 8.2928 1.0236 158
## Avg_Canopy_Cover-Meleagris_gallopavo 6.5281 1.0373 136
## Avg_Canopy_Cover-Sciurus_carolinensis 7.8012 1.0637 124
## I(Avg_Cogongrass_Cover^2)-Canis_latrans 5.3629 1.1976 188
## I(Avg_Cogongrass_Cover^2)-Procyon_lotor 4.9076 1.1820 206
## I(Avg_Cogongrass_Cover^2)-Dasypus_novemcinctus 2.8999 1.0338 435
## I(Avg_Cogongrass_Cover^2)-Lynx_rufus 5.9963 1.0719 124
## I(Avg_Cogongrass_Cover^2)-Didelphis_virginiana 2.2100 1.0081 381
## I(Avg_Cogongrass_Cover^2)-Sylvilagus_floridanus 2.7609 1.0428 492
## I(Avg_Cogongrass_Cover^2)-Meleagris_gallopavo 2.5886 1.1345 145
## I(Avg_Cogongrass_Cover^2)-Sciurus_carolinensis 3.2603 1.0438 331
## avg_veg_height-Canis_latrans 1.0100 1.0198 658
## avg_veg_height-Procyon_lotor 1.3782 1.0331 669
## avg_veg_height-Dasypus_novemcinctus 1.8723 1.0127 412
## avg_veg_height-Lynx_rufus 1.1352 1.0189 380
## avg_veg_height-Didelphis_virginiana 1.2237 1.0316 690
## avg_veg_height-Sylvilagus_floridanus 1.1594 1.0244 539
## avg_veg_height-Meleagris_gallopavo 1.6612 1.0153 388
## avg_veg_height-Sciurus_carolinensis 2.3143 1.0107 477
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.5544 0.1939 -2.9375 -2.5545 -2.1945 1.0104
## (Intercept)-Procyon_lotor -2.2164 0.1580 -2.5254 -2.2159 -1.9194 1.0401
## (Intercept)-Dasypus_novemcinctus -1.7141 0.1936 -2.1031 -1.7118 -1.3393 1.0022
## (Intercept)-Lynx_rufus -3.4220 0.3338 -4.1320 -3.4072 -2.8058 1.0072
## (Intercept)-Didelphis_virginiana -2.5171 0.3118 -3.1357 -2.5150 -1.9247 1.0073
## (Intercept)-Sylvilagus_floridanus -3.0727 0.2686 -3.6098 -3.0708 -2.5631 1.0278
## (Intercept)-Meleagris_gallopavo -3.4202 0.5067 -4.4520 -3.4132 -2.4061 1.0086
## (Intercept)-Sciurus_carolinensis -2.6920 0.3449 -3.3863 -2.6935 -2.0387 1.0046
## shrub_cover-Canis_latrans -0.2717 0.2348 -0.7373 -0.2726 0.1976 1.0016
## shrub_cover-Procyon_lotor 0.2982 0.1569 -0.0050 0.2989 0.6052 1.0097
## shrub_cover-Dasypus_novemcinctus 1.0498 0.3207 0.4453 1.0446 1.6793 1.0003
## shrub_cover-Lynx_rufus 0.0674 0.3618 -0.6602 0.0668 0.7631 1.0168
## shrub_cover-Didelphis_virginiana 1.1395 0.3869 0.4388 1.1203 1.9325 1.0015
## shrub_cover-Sylvilagus_floridanus 0.5862 0.3912 -0.1580 0.5827 1.3948 1.0248
## shrub_cover-Meleagris_gallopavo -0.3445 0.4545 -1.2911 -0.3353 0.5341 1.0011
## shrub_cover-Sciurus_carolinensis 1.1197 0.4159 0.2942 1.1257 1.9483 1.0188
## veg_height-Canis_latrans -0.5407 0.1933 -0.9376 -0.5323 -0.1912 1.0046
## veg_height-Procyon_lotor 0.3686 0.1234 0.1237 0.3680 0.6150 1.0055
## veg_height-Dasypus_novemcinctus 0.2934 0.1408 0.0255 0.2903 0.5807 1.0066
## veg_height-Lynx_rufus 0.1676 0.2397 -0.3241 0.1778 0.6275 1.0103
## veg_height-Didelphis_virginiana 0.5351 0.2476 0.0660 0.5285 1.0305 1.0120
## veg_height-Sylvilagus_floridanus 0.1871 0.2432 -0.2897 0.1819 0.6613 1.0110
## veg_height-Meleagris_gallopavo -0.0632 0.4228 -0.8561 -0.0804 0.8384 1.0133
## veg_height-Sciurus_carolinensis 0.1738 0.2295 -0.2698 0.1718 0.6224 1.0012
## week-Canis_latrans 0.4651 0.2548 -0.0025 0.4530 1.0016 1.0156
## week-Procyon_lotor 0.1527 0.1993 -0.2362 0.1507 0.5550 1.0076
## week-Dasypus_novemcinctus 0.0575 0.2147 -0.3657 0.0569 0.4847 1.0022
## week-Lynx_rufus 0.2813 0.3022 -0.3048 0.2783 0.9003 1.0008
## week-Didelphis_virginiana 0.0244 0.3238 -0.6489 0.0344 0.6452 1.0002
## week-Sylvilagus_floridanus 0.0319 0.3064 -0.6218 0.0525 0.5889 1.0251
## week-Meleagris_gallopavo -0.1233 0.3591 -0.9316 -0.0936 0.5268 1.0010
## week-Sciurus_carolinensis 0.5489 0.3347 -0.0514 0.5323 1.2480 1.0145
## I(week^2)-Canis_latrans -0.1996 0.1052 -0.4152 -0.1971 -0.0033 1.0266
## I(week^2)-Procyon_lotor -0.1062 0.0880 -0.2875 -0.1026 0.0641 1.0104
## I(week^2)-Dasypus_novemcinctus -0.1557 0.1048 -0.3610 -0.1536 0.0490 1.0021
## I(week^2)-Lynx_rufus -0.2076 0.1461 -0.5022 -0.2042 0.0670 1.0047
## I(week^2)-Didelphis_virginiana -0.3726 0.2121 -0.8276 -0.3525 -0.0202 1.0180
## I(week^2)-Sylvilagus_floridanus -0.1609 0.1548 -0.4853 -0.1556 0.1388 1.0133
## I(week^2)-Meleagris_gallopavo -0.3866 0.2759 -1.0824 -0.3459 0.0033 1.0579
## I(week^2)-Sciurus_carolinensis -0.2024 0.1384 -0.4781 -0.1980 0.0515 1.0212
## ESS
## (Intercept)-Canis_latrans 1030
## (Intercept)-Procyon_lotor 1307
## (Intercept)-Dasypus_novemcinctus 776
## (Intercept)-Lynx_rufus 345
## (Intercept)-Didelphis_virginiana 436
## (Intercept)-Sylvilagus_floridanus 762
## (Intercept)-Meleagris_gallopavo 163
## (Intercept)-Sciurus_carolinensis 474
## shrub_cover-Canis_latrans 628
## shrub_cover-Procyon_lotor 1018
## shrub_cover-Dasypus_novemcinctus 522
## shrub_cover-Lynx_rufus 417
## shrub_cover-Didelphis_virginiana 337
## shrub_cover-Sylvilagus_floridanus 406
## shrub_cover-Meleagris_gallopavo 285
## shrub_cover-Sciurus_carolinensis 254
## veg_height-Canis_latrans 789
## veg_height-Procyon_lotor 1452
## veg_height-Dasypus_novemcinctus 1204
## veg_height-Lynx_rufus 548
## veg_height-Didelphis_virginiana 805
## veg_height-Sylvilagus_floridanus 647
## veg_height-Meleagris_gallopavo 223
## veg_height-Sciurus_carolinensis 714
## week-Canis_latrans 1030
## week-Procyon_lotor 1691
## week-Dasypus_novemcinctus 1734
## week-Lynx_rufus 935
## week-Didelphis_virginiana 1225
## week-Sylvilagus_floridanus 904
## week-Meleagris_gallopavo 466
## week-Sciurus_carolinensis 1112
## I(week^2)-Canis_latrans 967
## I(week^2)-Procyon_lotor 1560
## I(week^2)-Dasypus_novemcinctus 1573
## I(week^2)-Lynx_rufus 685
## I(week^2)-Didelphis_virginiana 375
## I(week^2)-Sylvilagus_floridanus 693
## I(week^2)-Meleagris_gallopavo 160
## I(week^2)-Sciurus_carolinensis 1141
waicOcc(ms_full_full, by.sp = FALSE)
## elpd pD WAIC
## -963.76501 98.07177 2123.67357
waicOcc(ms_null_null, by.sp = FALSE)
## elpd pD WAIC
## -1066.76818 27.35458 2188.24552
waicOcc(ms_cover_forage, by.sp = FALSE)
## elpd pD WAIC
## -1016.47654 73.91951 2180.79209
waicOcc(ms_cover_move, by.sp = FALSE)
## elpd pD WAIC
## -1005.98593 86.02697 2184.02580
waicOcc(ms_cover_canopy, by.sp = FALSE)
## elpd pD WAIC
## -1000.43691 73.18689 2147.24759
waicOcc(ms_weekQ_cogonQ, by.sp = FALSE)
## elpd pD WAIC
## -1038.53299 56.90517 2190.87631
waicOcc(ms_fullQ_cover, by.sp = FALSE)
## elpd pD WAIC
## -997.7410 101.8048 2199.0916
waicOcc(ms_fullQ_forage, by.sp = FALSE)
## elpd pD WAIC
## -1005.85268 89.95164 2191.60864
waicOcc(ms_fullQ_fullQ, by.sp = FALSE)
## elpd pD WAIC
## -956.0063 105.4959 2123.0044
This test explains how well the model fits that data at the community and species level. I believe 0.5 is the target p-value, though how far from this number is considered adequate, I do not know yet. I believe this is a good place to check when thinking about which species we include in the model (currently set at mammals with > 2 occurences).
ppc.ms_fullQ_fullQ <- ppcOcc(ms_fullQ_fullQ, fit.stat = "freeman-tukey", group = 1)
## Currently on species 1 out of 8
## Currently on species 2 out of 8
## Currently on species 3 out of 8
## Currently on species 4 out of 8
## Currently on species 5 out of 8
## Currently on species 6 out of 8
## Currently on species 7 out of 8
## Currently on species 8 out of 8
summary(ppc.ms_fullQ_fullQ)
##
## Call:
## ppcOcc(object = ms_fullQ_fullQ, fit.stat = "freeman-tukey", group = 1)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Bayesian p-value: 0.3431
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Canis_latrans Bayesian p-value: 0.6347
## Procyon_lotor Bayesian p-value: 0.0817
## Dasypus_novemcinctus Bayesian p-value: 0
## Lynx_rufus Bayesian p-value: 0.347
## Didelphis_virginiana Bayesian p-value: 0.3873
## Sylvilagus_floridanus Bayesian p-value: 0.4033
## Meleagris_gallopavo Bayesian p-value: 0.613
## Sciurus_carolinensis Bayesian p-value: 0.2777
## Fit statistic: freeman-tukey
summary(ms_fullQ_fullQ) # Summary of parameter estimates
##
## Call:
## msPGOcc(occ.formula = occ.full.quad, det.formula = det.full.quad,
## data = data_list, n.samples = 5000, n.report = 500, n.burn = 3000,
## n.thin = 2, n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.7537
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -1.7235 0.7095 -3.1375 -1.7110 -0.2918 1.0562 275
## Cogon_Patch_Size 0.1484 0.6995 -1.2852 0.1599 1.5669 1.0123 405
## Veg_shannon_index 0.9525 0.5013 0.0492 0.9306 2.0148 1.0693 316
## total_shrub_cover -1.1314 0.6757 -2.5946 -1.0711 0.0498 1.1126 273
## Avg_Cogongrass_Cover -0.0762 0.9755 -1.9276 -0.0692 1.8944 1.0540 136
## Tree_Density -2.0317 0.8634 -3.7568 -2.0181 -0.3455 1.0124 333
## Avg_Canopy_Cover 1.8308 0.7570 0.3941 1.7769 3.4165 1.0140 590
## I(Avg_Cogongrass_Cover^2) 1.3546 0.6555 0.0923 1.3345 2.7259 1.0135 354
## avg_veg_height -0.0525 0.5395 -1.1276 -0.0395 1.0308 1.0378 310
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 1.7146 2.6566 0.0626 0.8897 8.3081 1.1264 324
## Cogon_Patch_Size 2.5519 4.2385 0.0705 1.2007 13.3977 1.1546 371
## Veg_shannon_index 0.7461 1.4228 0.0477 0.3601 3.6363 1.3552 237
## total_shrub_cover 2.1827 3.2039 0.0900 1.1690 11.0854 1.0448 246
## Avg_Cogongrass_Cover 1.2640 2.1029 0.0519 0.5789 6.6759 1.0083 801
## Tree_Density 4.3451 11.7271 0.0640 1.2593 27.1744 1.3055 164
## Avg_Canopy_Cover 4.5420 8.5621 0.1757 2.2387 22.9439 1.1174 130
## I(Avg_Cogongrass_Cover^2) 2.1214 3.5226 0.0734 0.9972 11.4620 1.3056 218
## avg_veg_height 0.7750 1.3112 0.0459 0.3702 4.1031 1.0200 547
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 1.6082 2.1146 0.074 0.8259 7.8389 1.0819 93
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.6239 0.3024 -3.2187 -2.6239 -2.0310 1.0008 1500
## shrub_cover 0.4503 0.3198 -0.1750 0.4470 1.0936 1.0026 949
## veg_height 0.1386 0.2007 -0.2628 0.1373 0.5290 1.0024 921
## week 0.1793 0.2204 -0.2484 0.1792 0.6080 1.0060 1262
## I(week^2) -0.2207 0.1250 -0.4685 -0.2157 0.0132 1.0092 908
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.6408 0.5429 0.1470 0.4864 1.9991 1.0049 773
## shrub_cover 0.6972 0.6079 0.1326 0.5349 2.2211 1.0034 763
## veg_height 0.2582 0.2244 0.0559 0.1946 0.8238 1.0006 1854
## week 0.2232 0.2486 0.0374 0.1515 0.8647 1.0050 981
## I(week^2) 0.0851 0.0956 0.0205 0.0599 0.2917 1.0685 444
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50%
## (Intercept)-Canis_latrans -1.3693 0.9740 -3.2017 -1.4028
## (Intercept)-Procyon_lotor -1.0115 0.9598 -2.8670 -1.0470
## (Intercept)-Dasypus_novemcinctus -2.0385 0.9381 -4.0088 -1.9553
## (Intercept)-Lynx_rufus -1.4316 1.1363 -3.3866 -1.5315
## (Intercept)-Didelphis_virginiana -2.5408 1.0903 -4.8961 -2.4554
## (Intercept)-Sylvilagus_floridanus -1.8667 0.9931 -3.9616 -1.8240
## (Intercept)-Meleagris_gallopavo -1.7028 1.1326 -3.9721 -1.7324
## (Intercept)-Sciurus_carolinensis -2.7890 1.2173 -5.6447 -2.6544
## Cogon_Patch_Size-Canis_latrans 1.3738 1.2656 -0.4572 1.1073
## Cogon_Patch_Size-Procyon_lotor -0.4097 0.8156 -2.1317 -0.3821
## Cogon_Patch_Size-Dasypus_novemcinctus 0.1621 0.8520 -1.4422 0.1270
## Cogon_Patch_Size-Lynx_rufus -0.0301 1.3976 -2.7805 -0.0121
## Cogon_Patch_Size-Didelphis_virginiana 1.2883 1.0039 -0.3234 1.1544
## Cogon_Patch_Size-Sylvilagus_floridanus -0.9861 1.4622 -4.7525 -0.7234
## Cogon_Patch_Size-Meleagris_gallopavo 0.4691 1.3213 -1.6356 0.3199
## Cogon_Patch_Size-Sciurus_carolinensis -0.5412 1.1668 -3.2404 -0.3993
## Veg_shannon_index-Canis_latrans 1.3091 0.7118 0.1185 1.2321
## Veg_shannon_index-Procyon_lotor 1.1699 0.6261 0.0945 1.1114
## Veg_shannon_index-Dasypus_novemcinctus 0.5918 0.6250 -0.6939 0.6053
## Veg_shannon_index-Lynx_rufus 0.9348 0.8807 -0.7520 0.9286
## Veg_shannon_index-Didelphis_virginiana 1.1716 0.7392 -0.0662 1.0952
## Veg_shannon_index-Sylvilagus_floridanus 0.9929 0.7222 -0.3873 0.9644
## Veg_shannon_index-Meleagris_gallopavo 1.2823 0.8398 -0.1169 1.1831
## Veg_shannon_index-Sciurus_carolinensis 0.3850 0.7940 -1.4078 0.4640
## total_shrub_cover-Canis_latrans 0.1184 0.8531 -1.2835 0.0294
## total_shrub_cover-Procyon_lotor -1.5117 0.7185 -3.0928 -1.4485
## total_shrub_cover-Dasypus_novemcinctus -0.6292 1.0214 -2.7340 -0.5020
## total_shrub_cover-Lynx_rufus -1.8371 1.2994 -5.0248 -1.6138
## total_shrub_cover-Didelphis_virginiana -1.4825 1.1710 -4.3404 -1.2758
## total_shrub_cover-Sylvilagus_floridanus -1.1820 1.2515 -4.1663 -1.0377
## total_shrub_cover-Meleagris_gallopavo -2.4928 1.4403 -5.8293 -2.2640
## total_shrub_cover-Sciurus_carolinensis -1.1304 1.1742 -3.8090 -1.0041
## Avg_Cogongrass_Cover-Canis_latrans 0.0187 1.2152 -2.3566 -0.0112
## Avg_Cogongrass_Cover-Procyon_lotor -0.1798 1.2189 -2.5596 -0.1588
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 0.5147 1.3000 -1.8463 0.4530
## Avg_Cogongrass_Cover-Lynx_rufus -0.0150 1.3104 -2.4567 -0.0165
## Avg_Cogongrass_Cover-Didelphis_virginiana 0.1155 1.2461 -2.3125 0.1130
## Avg_Cogongrass_Cover-Sylvilagus_floridanus -0.7083 1.3198 -3.4634 -0.6033
## Avg_Cogongrass_Cover-Meleagris_gallopavo -0.3646 1.3833 -3.2835 -0.2576
## Avg_Cogongrass_Cover-Sciurus_carolinensis -0.0188 1.2522 -2.4223 -0.0263
## Tree_Density-Canis_latrans -2.9939 1.5377 -6.8487 -2.7292
## Tree_Density-Procyon_lotor -2.1469 1.0132 -4.2898 -2.0801
## Tree_Density-Dasypus_novemcinctus -3.8875 2.4497 -10.3282 -3.2664
## Tree_Density-Lynx_rufus -0.8563 1.6912 -3.5803 -1.1157
## Tree_Density-Didelphis_virginiana -2.1226 1.4243 -5.2245 -2.0444
## Tree_Density-Sylvilagus_floridanus -2.5946 1.5551 -6.6434 -2.3872
## Tree_Density-Meleagris_gallopavo -2.2548 1.5152 -5.5715 -2.1407
## Tree_Density-Sciurus_carolinensis -2.2318 1.5344 -5.4869 -2.1796
## Avg_Canopy_Cover-Canis_latrans 0.1162 0.6797 -1.2548 0.1245
## Avg_Canopy_Cover-Procyon_lotor 1.5635 0.7944 0.1583 1.5011
## Avg_Canopy_Cover-Dasypus_novemcinctus 2.2666 1.0471 0.7411 2.0950
## Avg_Canopy_Cover-Lynx_rufus 0.9783 1.3288 -1.5718 0.9308
## Avg_Canopy_Cover-Didelphis_virginiana 3.1933 1.5829 1.0913 2.8654
## Avg_Canopy_Cover-Sylvilagus_floridanus 3.8551 1.9364 1.2305 3.5174
## Avg_Canopy_Cover-Meleagris_gallopavo 2.4715 1.5880 0.4191 2.1566
## Avg_Canopy_Cover-Sciurus_carolinensis 3.0776 1.8343 0.9380 2.6928
## I(Avg_Cogongrass_Cover^2)-Canis_latrans 2.2581 1.2370 0.5636 2.0326
## I(Avg_Cogongrass_Cover^2)-Procyon_lotor 2.2308 1.1146 0.5641 2.0632
## I(Avg_Cogongrass_Cover^2)-Dasypus_novemcinctus 1.3096 0.7442 0.0163 1.2575
## I(Avg_Cogongrass_Cover^2)-Lynx_rufus 2.4455 1.3518 0.5501 2.1935
## I(Avg_Cogongrass_Cover^2)-Didelphis_virginiana 0.7744 0.7290 -0.6793 0.7753
## I(Avg_Cogongrass_Cover^2)-Sylvilagus_floridanus 1.0311 0.7939 -0.4040 0.9929
## I(Avg_Cogongrass_Cover^2)-Meleagris_gallopavo 0.2554 1.3269 -2.5803 0.3369
## I(Avg_Cogongrass_Cover^2)-Sciurus_carolinensis 1.4284 0.8019 0.0196 1.3749
## avg_veg_height-Canis_latrans -0.2228 0.6620 -1.5677 -0.2058
## avg_veg_height-Procyon_lotor 0.0710 0.6665 -1.2534 0.0761
## avg_veg_height-Dasypus_novemcinctus 0.3333 0.7093 -0.9300 0.2824
## avg_veg_height-Lynx_rufus -0.4372 0.9553 -2.7051 -0.3192
## avg_veg_height-Didelphis_virginiana -0.1991 0.7465 -1.7851 -0.1825
## avg_veg_height-Sylvilagus_floridanus -0.2438 0.7885 -1.9673 -0.1874
## avg_veg_height-Meleagris_gallopavo -0.1246 0.9053 -1.9965 -0.1035
## avg_veg_height-Sciurus_carolinensis 0.3879 0.8164 -0.9967 0.2973
## 97.5% Rhat ESS
## (Intercept)-Canis_latrans 0.6752 1.0637 321
## (Intercept)-Procyon_lotor 0.9568 1.1194 281
## (Intercept)-Dasypus_novemcinctus -0.3966 1.0114 366
## (Intercept)-Lynx_rufus 1.2398 1.0847 260
## (Intercept)-Didelphis_virginiana -0.6983 1.0394 342
## (Intercept)-Sylvilagus_floridanus -0.0113 1.0207 328
## (Intercept)-Meleagris_gallopavo 0.6589 1.1115 286
## (Intercept)-Sciurus_carolinensis -0.8400 1.0292 334
## Cogon_Patch_Size-Canis_latrans 4.5542 1.0251 396
## Cogon_Patch_Size-Procyon_lotor 1.0423 1.0604 267
## Cogon_Patch_Size-Dasypus_novemcinctus 1.9636 1.0053 457
## Cogon_Patch_Size-Lynx_rufus 2.7051 1.0681 327
## Cogon_Patch_Size-Didelphis_virginiana 3.5828 1.0393 426
## Cogon_Patch_Size-Sylvilagus_floridanus 1.1881 1.1501 273
## Cogon_Patch_Size-Meleagris_gallopavo 3.4105 1.0779 301
## Cogon_Patch_Size-Sciurus_carolinensis 1.4509 1.0552 316
## Veg_shannon_index-Canis_latrans 2.9752 1.0912 173
## Veg_shannon_index-Procyon_lotor 2.6297 1.0816 238
## Veg_shannon_index-Dasypus_novemcinctus 1.7689 1.0200 405
## Veg_shannon_index-Lynx_rufus 2.7288 1.0594 370
## Veg_shannon_index-Didelphis_virginiana 2.8751 1.1013 286
## Veg_shannon_index-Sylvilagus_floridanus 2.5208 1.0184 438
## Veg_shannon_index-Meleagris_gallopavo 3.3078 1.0834 379
## Veg_shannon_index-Sciurus_carolinensis 1.7691 1.0193 448
## total_shrub_cover-Canis_latrans 2.0810 1.0213 390
## total_shrub_cover-Procyon_lotor -0.2949 1.0455 545
## total_shrub_cover-Dasypus_novemcinctus 0.9506 1.0543 316
## total_shrub_cover-Lynx_rufus 0.0887 1.0605 144
## total_shrub_cover-Didelphis_virginiana 0.2425 1.1086 197
## total_shrub_cover-Sylvilagus_floridanus 0.7968 1.0616 298
## total_shrub_cover-Meleagris_gallopavo -0.3317 1.1183 168
## total_shrub_cover-Sciurus_carolinensis 0.9201 1.1630 257
## Avg_Cogongrass_Cover-Canis_latrans 2.4826 1.0222 228
## Avg_Cogongrass_Cover-Procyon_lotor 2.2370 1.0475 156
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 3.3867 1.0368 226
## Avg_Cogongrass_Cover-Lynx_rufus 2.6573 1.0278 185
## Avg_Cogongrass_Cover-Didelphis_virginiana 2.7255 1.0075 236
## Avg_Cogongrass_Cover-Sylvilagus_floridanus 1.6407 1.0438 274
## Avg_Cogongrass_Cover-Meleagris_gallopavo 2.1358 1.0288 178
## Avg_Cogongrass_Cover-Sciurus_carolinensis 2.4303 1.0240 206
## Tree_Density-Canis_latrans -0.7149 1.1655 281
## Tree_Density-Procyon_lotor -0.3498 1.0479 422
## Tree_Density-Dasypus_novemcinctus -1.2369 1.2484 113
## Tree_Density-Lynx_rufus 3.2693 1.1204 197
## Tree_Density-Didelphis_virginiana 0.6075 1.0502 223
## Tree_Density-Sylvilagus_floridanus -0.1159 1.1181 185
## Tree_Density-Meleagris_gallopavo 0.5525 1.0180 253
## Tree_Density-Sciurus_carolinensis 0.8009 1.0617 270
## Avg_Canopy_Cover-Canis_latrans 1.4395 1.0188 562
## Avg_Canopy_Cover-Procyon_lotor 3.2829 1.0103 442
## Avg_Canopy_Cover-Dasypus_novemcinctus 4.8412 1.1247 181
## Avg_Canopy_Cover-Lynx_rufus 3.8247 1.0097 173
## Avg_Canopy_Cover-Didelphis_virginiana 7.4448 1.0325 154
## Avg_Canopy_Cover-Sylvilagus_floridanus 8.2928 1.0236 158
## Avg_Canopy_Cover-Meleagris_gallopavo 6.5281 1.0373 136
## Avg_Canopy_Cover-Sciurus_carolinensis 7.8012 1.0637 124
## I(Avg_Cogongrass_Cover^2)-Canis_latrans 5.3629 1.1976 188
## I(Avg_Cogongrass_Cover^2)-Procyon_lotor 4.9076 1.1820 206
## I(Avg_Cogongrass_Cover^2)-Dasypus_novemcinctus 2.8999 1.0338 435
## I(Avg_Cogongrass_Cover^2)-Lynx_rufus 5.9963 1.0719 124
## I(Avg_Cogongrass_Cover^2)-Didelphis_virginiana 2.2100 1.0081 381
## I(Avg_Cogongrass_Cover^2)-Sylvilagus_floridanus 2.7609 1.0428 492
## I(Avg_Cogongrass_Cover^2)-Meleagris_gallopavo 2.5886 1.1345 145
## I(Avg_Cogongrass_Cover^2)-Sciurus_carolinensis 3.2603 1.0438 331
## avg_veg_height-Canis_latrans 1.0100 1.0198 658
## avg_veg_height-Procyon_lotor 1.3782 1.0331 669
## avg_veg_height-Dasypus_novemcinctus 1.8723 1.0127 412
## avg_veg_height-Lynx_rufus 1.1352 1.0189 380
## avg_veg_height-Didelphis_virginiana 1.2237 1.0316 690
## avg_veg_height-Sylvilagus_floridanus 1.1594 1.0244 539
## avg_veg_height-Meleagris_gallopavo 1.6612 1.0153 388
## avg_veg_height-Sciurus_carolinensis 2.3143 1.0107 477
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.5544 0.1939 -2.9375 -2.5545 -2.1945 1.0104
## (Intercept)-Procyon_lotor -2.2164 0.1580 -2.5254 -2.2159 -1.9194 1.0401
## (Intercept)-Dasypus_novemcinctus -1.7141 0.1936 -2.1031 -1.7118 -1.3393 1.0022
## (Intercept)-Lynx_rufus -3.4220 0.3338 -4.1320 -3.4072 -2.8058 1.0072
## (Intercept)-Didelphis_virginiana -2.5171 0.3118 -3.1357 -2.5150 -1.9247 1.0073
## (Intercept)-Sylvilagus_floridanus -3.0727 0.2686 -3.6098 -3.0708 -2.5631 1.0278
## (Intercept)-Meleagris_gallopavo -3.4202 0.5067 -4.4520 -3.4132 -2.4061 1.0086
## (Intercept)-Sciurus_carolinensis -2.6920 0.3449 -3.3863 -2.6935 -2.0387 1.0046
## shrub_cover-Canis_latrans -0.2717 0.2348 -0.7373 -0.2726 0.1976 1.0016
## shrub_cover-Procyon_lotor 0.2982 0.1569 -0.0050 0.2989 0.6052 1.0097
## shrub_cover-Dasypus_novemcinctus 1.0498 0.3207 0.4453 1.0446 1.6793 1.0003
## shrub_cover-Lynx_rufus 0.0674 0.3618 -0.6602 0.0668 0.7631 1.0168
## shrub_cover-Didelphis_virginiana 1.1395 0.3869 0.4388 1.1203 1.9325 1.0015
## shrub_cover-Sylvilagus_floridanus 0.5862 0.3912 -0.1580 0.5827 1.3948 1.0248
## shrub_cover-Meleagris_gallopavo -0.3445 0.4545 -1.2911 -0.3353 0.5341 1.0011
## shrub_cover-Sciurus_carolinensis 1.1197 0.4159 0.2942 1.1257 1.9483 1.0188
## veg_height-Canis_latrans -0.5407 0.1933 -0.9376 -0.5323 -0.1912 1.0046
## veg_height-Procyon_lotor 0.3686 0.1234 0.1237 0.3680 0.6150 1.0055
## veg_height-Dasypus_novemcinctus 0.2934 0.1408 0.0255 0.2903 0.5807 1.0066
## veg_height-Lynx_rufus 0.1676 0.2397 -0.3241 0.1778 0.6275 1.0103
## veg_height-Didelphis_virginiana 0.5351 0.2476 0.0660 0.5285 1.0305 1.0120
## veg_height-Sylvilagus_floridanus 0.1871 0.2432 -0.2897 0.1819 0.6613 1.0110
## veg_height-Meleagris_gallopavo -0.0632 0.4228 -0.8561 -0.0804 0.8384 1.0133
## veg_height-Sciurus_carolinensis 0.1738 0.2295 -0.2698 0.1718 0.6224 1.0012
## week-Canis_latrans 0.4651 0.2548 -0.0025 0.4530 1.0016 1.0156
## week-Procyon_lotor 0.1527 0.1993 -0.2362 0.1507 0.5550 1.0076
## week-Dasypus_novemcinctus 0.0575 0.2147 -0.3657 0.0569 0.4847 1.0022
## week-Lynx_rufus 0.2813 0.3022 -0.3048 0.2783 0.9003 1.0008
## week-Didelphis_virginiana 0.0244 0.3238 -0.6489 0.0344 0.6452 1.0002
## week-Sylvilagus_floridanus 0.0319 0.3064 -0.6218 0.0525 0.5889 1.0251
## week-Meleagris_gallopavo -0.1233 0.3591 -0.9316 -0.0936 0.5268 1.0010
## week-Sciurus_carolinensis 0.5489 0.3347 -0.0514 0.5323 1.2480 1.0145
## I(week^2)-Canis_latrans -0.1996 0.1052 -0.4152 -0.1971 -0.0033 1.0266
## I(week^2)-Procyon_lotor -0.1062 0.0880 -0.2875 -0.1026 0.0641 1.0104
## I(week^2)-Dasypus_novemcinctus -0.1557 0.1048 -0.3610 -0.1536 0.0490 1.0021
## I(week^2)-Lynx_rufus -0.2076 0.1461 -0.5022 -0.2042 0.0670 1.0047
## I(week^2)-Didelphis_virginiana -0.3726 0.2121 -0.8276 -0.3525 -0.0202 1.0180
## I(week^2)-Sylvilagus_floridanus -0.1609 0.1548 -0.4853 -0.1556 0.1388 1.0133
## I(week^2)-Meleagris_gallopavo -0.3866 0.2759 -1.0824 -0.3459 0.0033 1.0579
## I(week^2)-Sciurus_carolinensis -0.2024 0.1384 -0.4781 -0.1980 0.0515 1.0212
## ESS
## (Intercept)-Canis_latrans 1030
## (Intercept)-Procyon_lotor 1307
## (Intercept)-Dasypus_novemcinctus 776
## (Intercept)-Lynx_rufus 345
## (Intercept)-Didelphis_virginiana 436
## (Intercept)-Sylvilagus_floridanus 762
## (Intercept)-Meleagris_gallopavo 163
## (Intercept)-Sciurus_carolinensis 474
## shrub_cover-Canis_latrans 628
## shrub_cover-Procyon_lotor 1018
## shrub_cover-Dasypus_novemcinctus 522
## shrub_cover-Lynx_rufus 417
## shrub_cover-Didelphis_virginiana 337
## shrub_cover-Sylvilagus_floridanus 406
## shrub_cover-Meleagris_gallopavo 285
## shrub_cover-Sciurus_carolinensis 254
## veg_height-Canis_latrans 789
## veg_height-Procyon_lotor 1452
## veg_height-Dasypus_novemcinctus 1204
## veg_height-Lynx_rufus 548
## veg_height-Didelphis_virginiana 805
## veg_height-Sylvilagus_floridanus 647
## veg_height-Meleagris_gallopavo 223
## veg_height-Sciurus_carolinensis 714
## week-Canis_latrans 1030
## week-Procyon_lotor 1691
## week-Dasypus_novemcinctus 1734
## week-Lynx_rufus 935
## week-Didelphis_virginiana 1225
## week-Sylvilagus_floridanus 904
## week-Meleagris_gallopavo 466
## week-Sciurus_carolinensis 1112
## I(week^2)-Canis_latrans 967
## I(week^2)-Procyon_lotor 1560
## I(week^2)-Dasypus_novemcinctus 1573
## I(week^2)-Lynx_rufus 685
## I(week^2)-Didelphis_virginiana 375
## I(week^2)-Sylvilagus_floridanus 693
## I(week^2)-Meleagris_gallopavo 160
## I(week^2)-Sciurus_carolinensis 1141
names(ms_fullQ_fullQ)
## [1] "rhat" "beta.comm.samples" "alpha.comm.samples"
## [4] "tau.sq.beta.samples" "tau.sq.alpha.samples" "beta.samples"
## [7] "alpha.samples" "z.samples" "psi.samples"
## [10] "like.samples" "sigma.sq.psi.samples" "beta.star.samples"
## [13] "re.level.names" "ESS" "X"
## [16] "X.p" "X.p.re" "X.re"
## [19] "y" "call" "n.samples"
## [22] "x.names" "sp.names" "x.p.names"
## [25] "n.post" "n.thin" "n.burn"
## [28] "n.chains" "pRE" "psiRE"
## [31] "run.time"
str(ms_fullQ_fullQ$beta.samples)
## 'mcmc' num [1:3000, 1:72] -0.38 -2.02 -1.25 -3.04 -1.95 ...
## - attr(*, "mcpar")= num [1:3] 1 3000 1
## - attr(*, "dimnames")=List of 2
## ..$ : NULL
## ..$ : chr [1:72] "(Intercept)-Canis_latrans" "(Intercept)-Procyon_lotor" "(Intercept)-Dasypus_novemcinctus" "(Intercept)-Lynx_rufus" ...
mean(ms_fullQ_fullQ$beta.samples[, 5] > 0) # effect of ? on occupancy
## [1] 0.005666667
MCMCplot(ms_fullQ_fullQ$beta.samples, ref_ovl = TRUE, ci = c(50, 95)) # Occupancy
MCMCplot(ms_fullQ_fullQ$alpha.samples, ref_ovl = TRUE, ci = c(50, 95)) # Detection
# Create a set of values across the range of observed cogongrass values
cogon.pred.vals <- seq(min(data_list$occ.covs$Avg_Cogongrass_Cover),
max(data_list$occ.covs$Avg_Cogongrass_Cover),
length.out = 100)
# Scale predicted values by mean and standard deviation used to fit the model
cogon.pred.vals.scale <- (cogon.pred.vals - mean(data_list$occ.covs$Avg_Cogongrass_Cover)) /
sd(data_list$occ.covs$Avg_Cogongrass_Cover)
# Predict occupancy across cogongrass cover values at mean values of all other variables
pred.df <- as.matrix(data.frame(intercept = 1, Avg_Cogongrass_Cover =
cogon.pred.vals.scale, 'I(Avg_Cogongrass_Cover^2)' = 0,
Cogon_Patch_Size = 0, Veg_shannon_index = 0,
total_shrub_cover = 0, Tree_Density = 0,
Avg_Canopy_Cover = 0, avg_veg_height = 0, Auth = 0))
out.pred <- predict(ms_fullQ_fullQ, pred.df)
str(out.pred)
## List of 3
## $ psi.0.samples: num [1:3000, 1:8, 1:100] 0.26723 0.01547 0.17074 0.00425 0.05629 ...
## $ z.0.samples : int [1:3000, 1:8, 1:100] 0 0 0 0 0 0 0 0 0 0 ...
## $ call : language predict.msPGOcc(object = ms_fullQ_fullQ, X.0 = pred.df)
## - attr(*, "class")= chr "predict.msPGOcc"
str(out.pred$psi.0.samples)
## num [1:3000, 1:8, 1:100] 0.26723 0.01547 0.17074 0.00425 0.05629 ...
psi.0.quants <- apply(out.pred$psi.0.samples, c(3), function(x) quantile(x, prob = c(0.025, 0.5, 0.975)))
str(psi.0.quants)
## num [1:3, 1:100] 0.00228 0.12743 0.87972 0.00261 0.13128 ...
## - attr(*, "dimnames")=List of 2
## ..$ : chr [1:3] "2.5%" "50%" "97.5%"
## ..$ : NULL
psi.plot.dat <- data.frame(
psi.med = psi.0.quants[2, ],
psi.low = psi.0.quants[1, ],
psi.high = psi.0.quants[3, ],
Avg_Cogongrass_Cover = cogon.pred.vals
)
str(psi.plot.dat)
## 'data.frame': 100 obs. of 4 variables:
## $ psi.med : num 0.127 0.131 0.131 0.131 0.129 ...
## $ psi.low : num 0.00228 0.00261 0.00255 0.00281 0.00274 ...
## $ psi.high : num 0.88 0.875 0.879 0.869 0.856 ...
## $ Avg_Cogongrass_Cover: num -0.708 -0.675 -0.641 -0.608 -0.575 ...
ggplot(psi.plot.dat, aes(x = Avg_Cogongrass_Cover, y = psi.med)) +
geom_ribbon(aes(ymin = psi.low, ymax = psi.high), fill = "grey70") +
geom_line() +
theme_bw() +
scale_y_continuous(limits = c(0, 1)) +
labs(x = "Average Cogongrass Cover", y = "Occupancy Probability")
summary(ms_fullQ_fullQ) # Summary of parameter estimates
##
## Call:
## msPGOcc(occ.formula = occ.full.quad, det.formula = det.full.quad,
## data = data_list, n.samples = 5000, n.report = 500, n.burn = 3000,
## n.thin = 2, n.chains = 3)
##
## Samples per Chain: 5000
## Burn-in: 3000
## Thinning Rate: 2
## Number of Chains: 3
## Total Posterior Samples: 3000
## Run Time (min): 0.7537
##
## ----------------------------------------
## Community Level
## ----------------------------------------
## Occurrence Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -1.7235 0.7095 -3.1375 -1.7110 -0.2918 1.0562 275
## Cogon_Patch_Size 0.1484 0.6995 -1.2852 0.1599 1.5669 1.0123 405
## Veg_shannon_index 0.9525 0.5013 0.0492 0.9306 2.0148 1.0693 316
## total_shrub_cover -1.1314 0.6757 -2.5946 -1.0711 0.0498 1.1126 273
## Avg_Cogongrass_Cover -0.0762 0.9755 -1.9276 -0.0692 1.8944 1.0540 136
## Tree_Density -2.0317 0.8634 -3.7568 -2.0181 -0.3455 1.0124 333
## Avg_Canopy_Cover 1.8308 0.7570 0.3941 1.7769 3.4165 1.0140 590
## I(Avg_Cogongrass_Cover^2) 1.3546 0.6555 0.0923 1.3345 2.7259 1.0135 354
## avg_veg_height -0.0525 0.5395 -1.1276 -0.0395 1.0308 1.0378 310
##
## Occurrence Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 1.7146 2.6566 0.0626 0.8897 8.3081 1.1264 324
## Cogon_Patch_Size 2.5519 4.2385 0.0705 1.2007 13.3977 1.1546 371
## Veg_shannon_index 0.7461 1.4228 0.0477 0.3601 3.6363 1.3552 237
## total_shrub_cover 2.1827 3.2039 0.0900 1.1690 11.0854 1.0448 246
## Avg_Cogongrass_Cover 1.2640 2.1029 0.0519 0.5789 6.6759 1.0083 801
## Tree_Density 4.3451 11.7271 0.0640 1.2593 27.1744 1.3055 164
## Avg_Canopy_Cover 4.5420 8.5621 0.1757 2.2387 22.9439 1.1174 130
## I(Avg_Cogongrass_Cover^2) 2.1214 3.5226 0.0734 0.9972 11.4620 1.3056 218
## avg_veg_height 0.7750 1.3112 0.0459 0.3702 4.1031 1.0200 547
##
## Occurrence Random Effect Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## Auth 1.6082 2.1146 0.074 0.8259 7.8389 1.0819 93
##
## Detection Means (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) -2.6239 0.3024 -3.2187 -2.6239 -2.0310 1.0008 1500
## shrub_cover 0.4503 0.3198 -0.1750 0.4470 1.0936 1.0026 949
## veg_height 0.1386 0.2007 -0.2628 0.1373 0.5290 1.0024 921
## week 0.1793 0.2204 -0.2484 0.1792 0.6080 1.0060 1262
## I(week^2) -0.2207 0.1250 -0.4685 -0.2157 0.0132 1.0092 908
##
## Detection Variances (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat ESS
## (Intercept) 0.6408 0.5429 0.1470 0.4864 1.9991 1.0049 773
## shrub_cover 0.6972 0.6079 0.1326 0.5349 2.2211 1.0034 763
## veg_height 0.2582 0.2244 0.0559 0.1946 0.8238 1.0006 1854
## week 0.2232 0.2486 0.0374 0.1515 0.8647 1.0050 981
## I(week^2) 0.0851 0.0956 0.0205 0.0599 0.2917 1.0685 444
##
## ----------------------------------------
## Species Level
## ----------------------------------------
## Occurrence (logit scale):
## Mean SD 2.5% 50%
## (Intercept)-Canis_latrans -1.3693 0.9740 -3.2017 -1.4028
## (Intercept)-Procyon_lotor -1.0115 0.9598 -2.8670 -1.0470
## (Intercept)-Dasypus_novemcinctus -2.0385 0.9381 -4.0088 -1.9553
## (Intercept)-Lynx_rufus -1.4316 1.1363 -3.3866 -1.5315
## (Intercept)-Didelphis_virginiana -2.5408 1.0903 -4.8961 -2.4554
## (Intercept)-Sylvilagus_floridanus -1.8667 0.9931 -3.9616 -1.8240
## (Intercept)-Meleagris_gallopavo -1.7028 1.1326 -3.9721 -1.7324
## (Intercept)-Sciurus_carolinensis -2.7890 1.2173 -5.6447 -2.6544
## Cogon_Patch_Size-Canis_latrans 1.3738 1.2656 -0.4572 1.1073
## Cogon_Patch_Size-Procyon_lotor -0.4097 0.8156 -2.1317 -0.3821
## Cogon_Patch_Size-Dasypus_novemcinctus 0.1621 0.8520 -1.4422 0.1270
## Cogon_Patch_Size-Lynx_rufus -0.0301 1.3976 -2.7805 -0.0121
## Cogon_Patch_Size-Didelphis_virginiana 1.2883 1.0039 -0.3234 1.1544
## Cogon_Patch_Size-Sylvilagus_floridanus -0.9861 1.4622 -4.7525 -0.7234
## Cogon_Patch_Size-Meleagris_gallopavo 0.4691 1.3213 -1.6356 0.3199
## Cogon_Patch_Size-Sciurus_carolinensis -0.5412 1.1668 -3.2404 -0.3993
## Veg_shannon_index-Canis_latrans 1.3091 0.7118 0.1185 1.2321
## Veg_shannon_index-Procyon_lotor 1.1699 0.6261 0.0945 1.1114
## Veg_shannon_index-Dasypus_novemcinctus 0.5918 0.6250 -0.6939 0.6053
## Veg_shannon_index-Lynx_rufus 0.9348 0.8807 -0.7520 0.9286
## Veg_shannon_index-Didelphis_virginiana 1.1716 0.7392 -0.0662 1.0952
## Veg_shannon_index-Sylvilagus_floridanus 0.9929 0.7222 -0.3873 0.9644
## Veg_shannon_index-Meleagris_gallopavo 1.2823 0.8398 -0.1169 1.1831
## Veg_shannon_index-Sciurus_carolinensis 0.3850 0.7940 -1.4078 0.4640
## total_shrub_cover-Canis_latrans 0.1184 0.8531 -1.2835 0.0294
## total_shrub_cover-Procyon_lotor -1.5117 0.7185 -3.0928 -1.4485
## total_shrub_cover-Dasypus_novemcinctus -0.6292 1.0214 -2.7340 -0.5020
## total_shrub_cover-Lynx_rufus -1.8371 1.2994 -5.0248 -1.6138
## total_shrub_cover-Didelphis_virginiana -1.4825 1.1710 -4.3404 -1.2758
## total_shrub_cover-Sylvilagus_floridanus -1.1820 1.2515 -4.1663 -1.0377
## total_shrub_cover-Meleagris_gallopavo -2.4928 1.4403 -5.8293 -2.2640
## total_shrub_cover-Sciurus_carolinensis -1.1304 1.1742 -3.8090 -1.0041
## Avg_Cogongrass_Cover-Canis_latrans 0.0187 1.2152 -2.3566 -0.0112
## Avg_Cogongrass_Cover-Procyon_lotor -0.1798 1.2189 -2.5596 -0.1588
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 0.5147 1.3000 -1.8463 0.4530
## Avg_Cogongrass_Cover-Lynx_rufus -0.0150 1.3104 -2.4567 -0.0165
## Avg_Cogongrass_Cover-Didelphis_virginiana 0.1155 1.2461 -2.3125 0.1130
## Avg_Cogongrass_Cover-Sylvilagus_floridanus -0.7083 1.3198 -3.4634 -0.6033
## Avg_Cogongrass_Cover-Meleagris_gallopavo -0.3646 1.3833 -3.2835 -0.2576
## Avg_Cogongrass_Cover-Sciurus_carolinensis -0.0188 1.2522 -2.4223 -0.0263
## Tree_Density-Canis_latrans -2.9939 1.5377 -6.8487 -2.7292
## Tree_Density-Procyon_lotor -2.1469 1.0132 -4.2898 -2.0801
## Tree_Density-Dasypus_novemcinctus -3.8875 2.4497 -10.3282 -3.2664
## Tree_Density-Lynx_rufus -0.8563 1.6912 -3.5803 -1.1157
## Tree_Density-Didelphis_virginiana -2.1226 1.4243 -5.2245 -2.0444
## Tree_Density-Sylvilagus_floridanus -2.5946 1.5551 -6.6434 -2.3872
## Tree_Density-Meleagris_gallopavo -2.2548 1.5152 -5.5715 -2.1407
## Tree_Density-Sciurus_carolinensis -2.2318 1.5344 -5.4869 -2.1796
## Avg_Canopy_Cover-Canis_latrans 0.1162 0.6797 -1.2548 0.1245
## Avg_Canopy_Cover-Procyon_lotor 1.5635 0.7944 0.1583 1.5011
## Avg_Canopy_Cover-Dasypus_novemcinctus 2.2666 1.0471 0.7411 2.0950
## Avg_Canopy_Cover-Lynx_rufus 0.9783 1.3288 -1.5718 0.9308
## Avg_Canopy_Cover-Didelphis_virginiana 3.1933 1.5829 1.0913 2.8654
## Avg_Canopy_Cover-Sylvilagus_floridanus 3.8551 1.9364 1.2305 3.5174
## Avg_Canopy_Cover-Meleagris_gallopavo 2.4715 1.5880 0.4191 2.1566
## Avg_Canopy_Cover-Sciurus_carolinensis 3.0776 1.8343 0.9380 2.6928
## I(Avg_Cogongrass_Cover^2)-Canis_latrans 2.2581 1.2370 0.5636 2.0326
## I(Avg_Cogongrass_Cover^2)-Procyon_lotor 2.2308 1.1146 0.5641 2.0632
## I(Avg_Cogongrass_Cover^2)-Dasypus_novemcinctus 1.3096 0.7442 0.0163 1.2575
## I(Avg_Cogongrass_Cover^2)-Lynx_rufus 2.4455 1.3518 0.5501 2.1935
## I(Avg_Cogongrass_Cover^2)-Didelphis_virginiana 0.7744 0.7290 -0.6793 0.7753
## I(Avg_Cogongrass_Cover^2)-Sylvilagus_floridanus 1.0311 0.7939 -0.4040 0.9929
## I(Avg_Cogongrass_Cover^2)-Meleagris_gallopavo 0.2554 1.3269 -2.5803 0.3369
## I(Avg_Cogongrass_Cover^2)-Sciurus_carolinensis 1.4284 0.8019 0.0196 1.3749
## avg_veg_height-Canis_latrans -0.2228 0.6620 -1.5677 -0.2058
## avg_veg_height-Procyon_lotor 0.0710 0.6665 -1.2534 0.0761
## avg_veg_height-Dasypus_novemcinctus 0.3333 0.7093 -0.9300 0.2824
## avg_veg_height-Lynx_rufus -0.4372 0.9553 -2.7051 -0.3192
## avg_veg_height-Didelphis_virginiana -0.1991 0.7465 -1.7851 -0.1825
## avg_veg_height-Sylvilagus_floridanus -0.2438 0.7885 -1.9673 -0.1874
## avg_veg_height-Meleagris_gallopavo -0.1246 0.9053 -1.9965 -0.1035
## avg_veg_height-Sciurus_carolinensis 0.3879 0.8164 -0.9967 0.2973
## 97.5% Rhat ESS
## (Intercept)-Canis_latrans 0.6752 1.0637 321
## (Intercept)-Procyon_lotor 0.9568 1.1194 281
## (Intercept)-Dasypus_novemcinctus -0.3966 1.0114 366
## (Intercept)-Lynx_rufus 1.2398 1.0847 260
## (Intercept)-Didelphis_virginiana -0.6983 1.0394 342
## (Intercept)-Sylvilagus_floridanus -0.0113 1.0207 328
## (Intercept)-Meleagris_gallopavo 0.6589 1.1115 286
## (Intercept)-Sciurus_carolinensis -0.8400 1.0292 334
## Cogon_Patch_Size-Canis_latrans 4.5542 1.0251 396
## Cogon_Patch_Size-Procyon_lotor 1.0423 1.0604 267
## Cogon_Patch_Size-Dasypus_novemcinctus 1.9636 1.0053 457
## Cogon_Patch_Size-Lynx_rufus 2.7051 1.0681 327
## Cogon_Patch_Size-Didelphis_virginiana 3.5828 1.0393 426
## Cogon_Patch_Size-Sylvilagus_floridanus 1.1881 1.1501 273
## Cogon_Patch_Size-Meleagris_gallopavo 3.4105 1.0779 301
## Cogon_Patch_Size-Sciurus_carolinensis 1.4509 1.0552 316
## Veg_shannon_index-Canis_latrans 2.9752 1.0912 173
## Veg_shannon_index-Procyon_lotor 2.6297 1.0816 238
## Veg_shannon_index-Dasypus_novemcinctus 1.7689 1.0200 405
## Veg_shannon_index-Lynx_rufus 2.7288 1.0594 370
## Veg_shannon_index-Didelphis_virginiana 2.8751 1.1013 286
## Veg_shannon_index-Sylvilagus_floridanus 2.5208 1.0184 438
## Veg_shannon_index-Meleagris_gallopavo 3.3078 1.0834 379
## Veg_shannon_index-Sciurus_carolinensis 1.7691 1.0193 448
## total_shrub_cover-Canis_latrans 2.0810 1.0213 390
## total_shrub_cover-Procyon_lotor -0.2949 1.0455 545
## total_shrub_cover-Dasypus_novemcinctus 0.9506 1.0543 316
## total_shrub_cover-Lynx_rufus 0.0887 1.0605 144
## total_shrub_cover-Didelphis_virginiana 0.2425 1.1086 197
## total_shrub_cover-Sylvilagus_floridanus 0.7968 1.0616 298
## total_shrub_cover-Meleagris_gallopavo -0.3317 1.1183 168
## total_shrub_cover-Sciurus_carolinensis 0.9201 1.1630 257
## Avg_Cogongrass_Cover-Canis_latrans 2.4826 1.0222 228
## Avg_Cogongrass_Cover-Procyon_lotor 2.2370 1.0475 156
## Avg_Cogongrass_Cover-Dasypus_novemcinctus 3.3867 1.0368 226
## Avg_Cogongrass_Cover-Lynx_rufus 2.6573 1.0278 185
## Avg_Cogongrass_Cover-Didelphis_virginiana 2.7255 1.0075 236
## Avg_Cogongrass_Cover-Sylvilagus_floridanus 1.6407 1.0438 274
## Avg_Cogongrass_Cover-Meleagris_gallopavo 2.1358 1.0288 178
## Avg_Cogongrass_Cover-Sciurus_carolinensis 2.4303 1.0240 206
## Tree_Density-Canis_latrans -0.7149 1.1655 281
## Tree_Density-Procyon_lotor -0.3498 1.0479 422
## Tree_Density-Dasypus_novemcinctus -1.2369 1.2484 113
## Tree_Density-Lynx_rufus 3.2693 1.1204 197
## Tree_Density-Didelphis_virginiana 0.6075 1.0502 223
## Tree_Density-Sylvilagus_floridanus -0.1159 1.1181 185
## Tree_Density-Meleagris_gallopavo 0.5525 1.0180 253
## Tree_Density-Sciurus_carolinensis 0.8009 1.0617 270
## Avg_Canopy_Cover-Canis_latrans 1.4395 1.0188 562
## Avg_Canopy_Cover-Procyon_lotor 3.2829 1.0103 442
## Avg_Canopy_Cover-Dasypus_novemcinctus 4.8412 1.1247 181
## Avg_Canopy_Cover-Lynx_rufus 3.8247 1.0097 173
## Avg_Canopy_Cover-Didelphis_virginiana 7.4448 1.0325 154
## Avg_Canopy_Cover-Sylvilagus_floridanus 8.2928 1.0236 158
## Avg_Canopy_Cover-Meleagris_gallopavo 6.5281 1.0373 136
## Avg_Canopy_Cover-Sciurus_carolinensis 7.8012 1.0637 124
## I(Avg_Cogongrass_Cover^2)-Canis_latrans 5.3629 1.1976 188
## I(Avg_Cogongrass_Cover^2)-Procyon_lotor 4.9076 1.1820 206
## I(Avg_Cogongrass_Cover^2)-Dasypus_novemcinctus 2.8999 1.0338 435
## I(Avg_Cogongrass_Cover^2)-Lynx_rufus 5.9963 1.0719 124
## I(Avg_Cogongrass_Cover^2)-Didelphis_virginiana 2.2100 1.0081 381
## I(Avg_Cogongrass_Cover^2)-Sylvilagus_floridanus 2.7609 1.0428 492
## I(Avg_Cogongrass_Cover^2)-Meleagris_gallopavo 2.5886 1.1345 145
## I(Avg_Cogongrass_Cover^2)-Sciurus_carolinensis 3.2603 1.0438 331
## avg_veg_height-Canis_latrans 1.0100 1.0198 658
## avg_veg_height-Procyon_lotor 1.3782 1.0331 669
## avg_veg_height-Dasypus_novemcinctus 1.8723 1.0127 412
## avg_veg_height-Lynx_rufus 1.1352 1.0189 380
## avg_veg_height-Didelphis_virginiana 1.2237 1.0316 690
## avg_veg_height-Sylvilagus_floridanus 1.1594 1.0244 539
## avg_veg_height-Meleagris_gallopavo 1.6612 1.0153 388
## avg_veg_height-Sciurus_carolinensis 2.3143 1.0107 477
##
## Detection (logit scale):
## Mean SD 2.5% 50% 97.5% Rhat
## (Intercept)-Canis_latrans -2.5544 0.1939 -2.9375 -2.5545 -2.1945 1.0104
## (Intercept)-Procyon_lotor -2.2164 0.1580 -2.5254 -2.2159 -1.9194 1.0401
## (Intercept)-Dasypus_novemcinctus -1.7141 0.1936 -2.1031 -1.7118 -1.3393 1.0022
## (Intercept)-Lynx_rufus -3.4220 0.3338 -4.1320 -3.4072 -2.8058 1.0072
## (Intercept)-Didelphis_virginiana -2.5171 0.3118 -3.1357 -2.5150 -1.9247 1.0073
## (Intercept)-Sylvilagus_floridanus -3.0727 0.2686 -3.6098 -3.0708 -2.5631 1.0278
## (Intercept)-Meleagris_gallopavo -3.4202 0.5067 -4.4520 -3.4132 -2.4061 1.0086
## (Intercept)-Sciurus_carolinensis -2.6920 0.3449 -3.3863 -2.6935 -2.0387 1.0046
## shrub_cover-Canis_latrans -0.2717 0.2348 -0.7373 -0.2726 0.1976 1.0016
## shrub_cover-Procyon_lotor 0.2982 0.1569 -0.0050 0.2989 0.6052 1.0097
## shrub_cover-Dasypus_novemcinctus 1.0498 0.3207 0.4453 1.0446 1.6793 1.0003
## shrub_cover-Lynx_rufus 0.0674 0.3618 -0.6602 0.0668 0.7631 1.0168
## shrub_cover-Didelphis_virginiana 1.1395 0.3869 0.4388 1.1203 1.9325 1.0015
## shrub_cover-Sylvilagus_floridanus 0.5862 0.3912 -0.1580 0.5827 1.3948 1.0248
## shrub_cover-Meleagris_gallopavo -0.3445 0.4545 -1.2911 -0.3353 0.5341 1.0011
## shrub_cover-Sciurus_carolinensis 1.1197 0.4159 0.2942 1.1257 1.9483 1.0188
## veg_height-Canis_latrans -0.5407 0.1933 -0.9376 -0.5323 -0.1912 1.0046
## veg_height-Procyon_lotor 0.3686 0.1234 0.1237 0.3680 0.6150 1.0055
## veg_height-Dasypus_novemcinctus 0.2934 0.1408 0.0255 0.2903 0.5807 1.0066
## veg_height-Lynx_rufus 0.1676 0.2397 -0.3241 0.1778 0.6275 1.0103
## veg_height-Didelphis_virginiana 0.5351 0.2476 0.0660 0.5285 1.0305 1.0120
## veg_height-Sylvilagus_floridanus 0.1871 0.2432 -0.2897 0.1819 0.6613 1.0110
## veg_height-Meleagris_gallopavo -0.0632 0.4228 -0.8561 -0.0804 0.8384 1.0133
## veg_height-Sciurus_carolinensis 0.1738 0.2295 -0.2698 0.1718 0.6224 1.0012
## week-Canis_latrans 0.4651 0.2548 -0.0025 0.4530 1.0016 1.0156
## week-Procyon_lotor 0.1527 0.1993 -0.2362 0.1507 0.5550 1.0076
## week-Dasypus_novemcinctus 0.0575 0.2147 -0.3657 0.0569 0.4847 1.0022
## week-Lynx_rufus 0.2813 0.3022 -0.3048 0.2783 0.9003 1.0008
## week-Didelphis_virginiana 0.0244 0.3238 -0.6489 0.0344 0.6452 1.0002
## week-Sylvilagus_floridanus 0.0319 0.3064 -0.6218 0.0525 0.5889 1.0251
## week-Meleagris_gallopavo -0.1233 0.3591 -0.9316 -0.0936 0.5268 1.0010
## week-Sciurus_carolinensis 0.5489 0.3347 -0.0514 0.5323 1.2480 1.0145
## I(week^2)-Canis_latrans -0.1996 0.1052 -0.4152 -0.1971 -0.0033 1.0266
## I(week^2)-Procyon_lotor -0.1062 0.0880 -0.2875 -0.1026 0.0641 1.0104
## I(week^2)-Dasypus_novemcinctus -0.1557 0.1048 -0.3610 -0.1536 0.0490 1.0021
## I(week^2)-Lynx_rufus -0.2076 0.1461 -0.5022 -0.2042 0.0670 1.0047
## I(week^2)-Didelphis_virginiana -0.3726 0.2121 -0.8276 -0.3525 -0.0202 1.0180
## I(week^2)-Sylvilagus_floridanus -0.1609 0.1548 -0.4853 -0.1556 0.1388 1.0133
## I(week^2)-Meleagris_gallopavo -0.3866 0.2759 -1.0824 -0.3459 0.0033 1.0579
## I(week^2)-Sciurus_carolinensis -0.2024 0.1384 -0.4781 -0.1980 0.0515 1.0212
## ESS
## (Intercept)-Canis_latrans 1030
## (Intercept)-Procyon_lotor 1307
## (Intercept)-Dasypus_novemcinctus 776
## (Intercept)-Lynx_rufus 345
## (Intercept)-Didelphis_virginiana 436
## (Intercept)-Sylvilagus_floridanus 762
## (Intercept)-Meleagris_gallopavo 163
## (Intercept)-Sciurus_carolinensis 474
## shrub_cover-Canis_latrans 628
## shrub_cover-Procyon_lotor 1018
## shrub_cover-Dasypus_novemcinctus 522
## shrub_cover-Lynx_rufus 417
## shrub_cover-Didelphis_virginiana 337
## shrub_cover-Sylvilagus_floridanus 406
## shrub_cover-Meleagris_gallopavo 285
## shrub_cover-Sciurus_carolinensis 254
## veg_height-Canis_latrans 789
## veg_height-Procyon_lotor 1452
## veg_height-Dasypus_novemcinctus 1204
## veg_height-Lynx_rufus 548
## veg_height-Didelphis_virginiana 805
## veg_height-Sylvilagus_floridanus 647
## veg_height-Meleagris_gallopavo 223
## veg_height-Sciurus_carolinensis 714
## week-Canis_latrans 1030
## week-Procyon_lotor 1691
## week-Dasypus_novemcinctus 1734
## week-Lynx_rufus 935
## week-Didelphis_virginiana 1225
## week-Sylvilagus_floridanus 904
## week-Meleagris_gallopavo 466
## week-Sciurus_carolinensis 1112
## I(week^2)-Canis_latrans 967
## I(week^2)-Procyon_lotor 1560
## I(week^2)-Dasypus_novemcinctus 1573
## I(week^2)-Lynx_rufus 685
## I(week^2)-Didelphis_virginiana 375
## I(week^2)-Sylvilagus_floridanus 693
## I(week^2)-Meleagris_gallopavo 160
## I(week^2)-Sciurus_carolinensis 1141
names(ms_fullQ_fullQ)
## [1] "rhat" "beta.comm.samples" "alpha.comm.samples"
## [4] "tau.sq.beta.samples" "tau.sq.alpha.samples" "beta.samples"
## [7] "alpha.samples" "z.samples" "psi.samples"
## [10] "like.samples" "sigma.sq.psi.samples" "beta.star.samples"
## [13] "re.level.names" "ESS" "X"
## [16] "X.p" "X.p.re" "X.re"
## [19] "y" "call" "n.samples"
## [22] "x.names" "sp.names" "x.p.names"
## [25] "n.post" "n.thin" "n.burn"
## [28] "n.chains" "pRE" "psiRE"
## [31] "run.time"
str(ms_fullQ_fullQ$beta.samples)
## 'mcmc' num [1:3000, 1:72] -0.38 -2.02 -1.25 -3.04 -1.95 ...
## - attr(*, "mcpar")= num [1:3] 1 3000 1
## - attr(*, "dimnames")=List of 2
## ..$ : NULL
## ..$ : chr [1:72] "(Intercept)-Canis_latrans" "(Intercept)-Procyon_lotor" "(Intercept)-Dasypus_novemcinctus" "(Intercept)-Lynx_rufus" ...
mean(ms_fullQ_fullQ$beta.samples[, 5] > 0) # effect of ? on occupancy
## [1] 0.005666667
MCMCplot(ms_fullQ_fullQ$beta.samples, ref_ovl = TRUE, ci = c(50, 95)) # Occupancy
MCMCplot(ms_fullQ_fullQ$alpha.samples, ref_ovl = TRUE, ci = c(50, 95)) # Detection
## Occupancy
# Total number of parameters
n_params <- ncol(ms_fullQ_fullQ$beta.samples)
# Choose how many parameters to plot at a time
chunk_size <- 10
# Split and plot
for (i in seq(1, n_params, by = chunk_size)) {
end <- min(i + chunk_size - 1, n_params)
param_names <- colnames(ms_fullQ_fullQ$beta.samples)[i:end]
# Set filename
file_name <- paste0("MCMCplot_Occupancy_Params_", i, "_to_", end, ".png")
# Save plot to PNG
png(filename = file_name, width = 1200, height = 800, res = 150)
MCMCplot(ms_fullQ_fullQ$beta.samples[, param_names],
ref_ovl = TRUE,
ci = c(50, 95),
main = paste0("Occupancy Parameters: ", i, " to ", end))
dev.off()
}
## Detection
# Number of parameters
n_params <- ncol(ms_fullQ_fullQ$alpha.samples)
# Number of parameters to plot at a time
chunk_size <- 10
# Split and plot
for (i in seq(1, n_params, by = chunk_size)) {
end <- min(i + chunk_size - 1, n_params)
param_names <- colnames(ms_fullQ_fullQ$alpha.samples)[i:end]
# Set filename
file_name <- paste0("MCMCplot_Detection_Params_", i, "_to_", end, ".png")
# Save plot to PNG
png(filename = file_name, width = 1200, height = 800, res = 150)
MCMCplot(ms_fullQ_fullQ$alpha.samples[, param_names],
ref_ovl = TRUE,
ci = c(50, 95),
main = paste0("Detection Parameters: ", i, " to ", end))
dev.off()
}
species_index <- which(dimnames(data_list$y)$species == "Procyon_lotor")
# Create a set of values across the range of observed cogongrass values
cogon.pred.vals <- seq(min(data_list$occ.covs$Avg_Cogongrass_Cover),
max(data_list$occ.covs$Avg_Cogongrass_Cover),
length.out = 100)
# Scale predicted values by mean and standard deviation used to fit the model
cogon.pred.vals.scale <- (cogon.pred.vals - mean(data_list$occ.covs$Avg_Cogongrass_Cover)) /
sd(data_list$occ.covs$Avg_Cogongrass_Cover)
# Predict occupancy across cogongrass cover values at mean values of all other variables
pred.df <- as.matrix(data.frame(intercept = 1, Avg_Cogongrass_Cover =
cogon.pred.vals.scale, 'I(Avg_Cogongrass_Cover^2)' = 0,
Cogon_Patch_Size = 0, Veg_shannon_index = 0,
total_shrub_cover = 0, Tree_Density = 0,
Avg_Canopy_Cover = 0, avg_veg_height = 0, Auth = 0))
out.pred <- predict(ms_fullQ_fullQ, pred.df, species = species_index)
## Warning in predict.msPGOcc(ms_fullQ_fullQ, pred.df, species = species_index):
## 'species' is not an argument
str(out.pred)
## List of 3
## $ psi.0.samples: num [1:3000, 1:8, 1:100] 0.1832 0.0227 0.049 0.0109 0.1569 ...
## $ z.0.samples : int [1:3000, 1:8, 1:100] 0 0 1 0 0 0 1 0 0 0 ...
## $ call : language predict.msPGOcc(object = ms_fullQ_fullQ, X.0 = pred.df, species = species_index)
## - attr(*, "class")= chr "predict.msPGOcc"
str(out.pred$psi.0.samples)
## num [1:3000, 1:8, 1:100] 0.1832 0.0227 0.049 0.0109 0.1569 ...
psi.0.quants <- apply(out.pred$psi.0.samples, c(3), function(x) quantile(x, prob = c(0.025, 0.5, 0.975)))
str(psi.0.quants)
## num [1:3, 1:100] 0.00234 0.12581 0.87044 0.0025 0.12863 ...
## - attr(*, "dimnames")=List of 2
## ..$ : chr [1:3] "2.5%" "50%" "97.5%"
## ..$ : NULL
psi.plot.dat <- data.frame(
psi.med = psi.0.quants[2, ],
psi.low = psi.0.quants[1, ],
psi.high = psi.0.quants[3, ],
Avg_Cogongrass_Cover = cogon.pred.vals
)
str(psi.plot.dat)
## 'data.frame': 100 obs. of 4 variables:
## $ psi.med : num 0.126 0.129 0.13 0.129 0.131 ...
## $ psi.low : num 0.00234 0.0025 0.0028 0.00272 0.00283 ...
## $ psi.high : num 0.87 0.873 0.874 0.875 0.866 ...
## $ Avg_Cogongrass_Cover: num -0.708 -0.675 -0.641 -0.608 -0.575 ...
ggplot(psi.plot.dat, aes(x = Avg_Cogongrass_Cover, y = psi.med)) +
geom_ribbon(aes(ymin = psi.low, ymax = psi.high), fill = "grey70") +
geom_line() +
theme_bw() +
scale_y_continuous(limits = c(0, 1)) +
labs(x = "Average Cogongrass Cover", y = "Occupancy Probability") +
ggtitle("Procyon_lotor Occupancy vs Cogongrass Cover")