Plotting MultSE and sampling effort relationships of simulated data
plot_ssp(xx, opt, multi.site)
Arguments
xx: A data frame generated by summary_ssp
opt: A vector or data matrix generated by ioptimum
multi.site: Logical argument indicating whether several sites were simulated
Details
This function allows to visualize the behavior of the MultSE as sampling effort increases. When the simulation involves two sampling scales, a graph for samples and one for sites will be generated. Above the MultSE~Sampling effort projection, two shaded areas are drawn, highlighting: sub-optimal improvement (light grey), and optimal improvement (dark gray). Both reflect the sampling effort that improves the precision at acceptable (light gray) or desirable levels (dark gray), but beyond the later, any gain could be considered unnecessary. In addition, for each sampling effort, the relativized improvement (in relation to the MultSE estimated with the lower sampling effort) is presented cumulatively (as percentages). This is very useful because it indicates exactly how much the precision is improved for each sampling effort.The plot is generated using ggplot2.
Returns
A ggplot2 object
References
Guerra-Castro, E. J., J. C. Cajas, F. N. Dias Marques Simoes, J. J. Cruz-Motta, and M. Mascaro. (2020). SSP: An R package to estimate sampling effort in studies of ecological communities. bioRxiv:2020.2003.2019.996991.
Wickham, H. 2016. ggplot2: elegant graphics for data analysis. Springer.
This is an exploratory plot that can be edited using ggplot2 functions.
See Also
ggplot2
Examples
###To speed up the simulation of these examples, the cases, sites and N were set small.##Single site: micromollusk from Cayo Nuevo (Yucatan, Mexico)data(micromollusk)#Estimation of parameters of pilot datapar.mic<-assempar (data = micromollusk, type="P/A", Sest.method ="average")#Simulation of 3 data sets, each one with 20 potential sampling units from a single sitesim.mic<-simdata(par.mic, cases=3, N =20, sites =1)#Sampling and estimation of MultSE for each sample size (few repetitions#to speed up the example)sam.mic<-sampsd(dat.sim = sim.mic, Par = par.mic, transformation ="P/A", method ="jaccard", n =10, m =1, k =3)#Summary of MultSE for each sampling effortsumm.mic<-summary_ssp(results = sam.mic, multi.site =FALSE)#Cut-off points to identify optimal sampling effortopt.mic<-ioptimum(xx = summ.mic, multi.site =FALSE)#Plotplot_ssp(xx = summ.mic, opt = opt.mic, multi.site =FALSE)##Multiple sites: Sponges from Alacranes National Park (Yucatan, Mexico).data(sponges)#Estimation of parameters of pilot datapar.spo<-assempar(data = sponges, type="counts", Sest.method ="average")#Simulation of 3 data sets, each one with 10 potential sampling units in 3 sites.sim.spo<-simdata(par.spo, cases=3, N =10, sites =3)#Sampling and estimation of MultSE for each sampling design (few repetitions#to speed up the example)sam.spo<-sampsd(dat.sim = sim.spo, Par = par.spo, transformation ="square root", method ="bray", n =10, m =3, k =3)#Summary of MultSE for each sampling effortsumm.spo<-summary_ssp(results = sam.spo, multi.site =TRUE)#Cut-off points to identify optimal sampling effortopt.spo<-ioptimum(xx = summ.spo, multi.site =TRUE)#Plotplot_ssp(xx = summ.spo, opt = opt.spo, multi.site =TRUE)