# NOT RUN {
# Generate data with the default arguments and look at the structure
tmp <- simDynoccSpatial()
str(tmp)
# }
# NOT RUN {
# rather slow
# Large grid, seed.XAC = 88 gives a cool pattern
str(tmp <- simDynoccSpatial(side = 100, seed.XAC = 88))
# Longer series and no browsing through plots
str(tmp <- simDynoccSpatial(nyears = 100, ask.plot = FALSE))
# Dynamic system (high variance between years)
str(tmp <- simDynoccSpatial(range.phi = c(0, 0.8), range.gamma = c(0, 0.6)))
# Time-variation in all potentially time-varying parameters
str(tmp <- simDynoccSpatial(range.phi = c(0.5, 1), range.gamma = c(0, 0.5),
range.p = c(0.1, 0.9)))
# Strong spatial autocorrelation via a spatially structured covariate
str(tmp <- simDynoccSpatial(beta.XAC = c(1, 1, 1, 1), beta.Xautolog = c(0, 0)))
# Strong spatial autocorrelation via a spatially structured covariate
str(tmp <- simDynoccSpatial(beta.XAC = c(1, 1, 1, 1), beta.Xautolog = c(2, 2)))
# Strong spatial autocorrelation via a spatially structured covariate
# but now effect of that spatial field only on colonization and persistence
str(tmp <- simDynoccSpatial(beta.XAC = c(0, 1, 1, 0), beta.Xautolog = c(0, 0)))
# Can it ever go extinct ???
str(tmp <- simDynoccSpatial(side = 20, nyears = 20, mean.psi1 = 0.01,
range.phi = c(0.1, 0.1), range.gamma = c(0.1, 0.1), beta.Xautolog = c(0, 0)))
# Can it ever go extinct ??? -------> Yes
str(tmp <- simDynoccSpatial(side = 20, nyears = 10, mean.psi1 = 0.01,
range.phi = c(0.3, 0.3), range.gamma = c(0, 0), beta.Xautolog = c(0, 0)), seed = 24)
# Evolution of number of occupied quads
apply(tmp$z, 3, sum)
# [1] 2 0 0 0 0 0 0 0 0 0
# }
Run the code above in your browser using DataLab