Movatterモバイル変換


[0]ホーム

URL:


ecocbo

R-CMD-checkLicenseCRAN/METACRANGitHub R package version (subdirectory of monorepo)CRAN downloads

CalculatingOptimum Sampling Effort in Community Ecology

ecocbo is an R package that helps scientistscalculate the optimum sampling effort for community ecology projects.The package is based on the principles developed in theSSP package, whichsimulates ecological communities by extracting and using parameters thatcontrol the simulation. The simulated communities are then compared withPERMANOVA to estimate their components of variation and consequently theoptimal sampling effort.

ecocbo is a valuable tool for scientists who need todesign efficient sampling plans. The package can help scientists to savetime and money by ensuring that they collect the minimum amount of datanecessary to achieve their research goals.

Installation

You can easily obtain ‘ecocbo’ from CRAN:

install.packages("ecocbo")

Alternatively, you can install the development version of ecocbo fromGitHub:

install.packages("devtools")devtools::install_github("arturoSP/ecocbo")

Example

This is a basic example which shows you how to use the differentfunctions in the package:

Prepare the data

# Load data and pre-process it.data(epiDat)simResults<-prep_data(data = epiDat,type ="counts",Sest.method ="average",cases =5,N =100,M =10,n =5,m =5,k =30,transformation ="none",method ="bray",dummy =FALSE,useParallel =FALSE,model ="single.factor")

Calculate components ofvariation.

compVar<-scompvar(data = simResults)compVar#>     Source Est.var.comp#> 1 Residual     0.331926

Calculate statistical power

betaResult<-sim_beta(simResults,alpha =0.05)betaResult#> Power at different sampling efforts (n):#>       Power#> n = 2  0.44#> n = 3  0.70#> n = 4  0.93#> n = 5  0.97

Determine optimal samplingeffort

The sampling effort can be evaluated depending on an economic budget(ct) or desired precision level (multSE), depending on the proposedparameter, the function will calculate optimal values for number oftreatments (bOpt) and replicates (nOpt).

cboCost<-sim_cbo(betaResult,cn =75)cboCost#> Sampling designs that meet the required power:#>  n     Power Cost Suggested#>  2 0.4366667  150#>  3 0.7033333  225#>  4 0.9266667  300#>  5 0.9716194  375       ***#>#> The listed cost is per treatment.

Additionally…

Plot thepower progression as sampling increases.

# This plot will look different in every simulationplot_power(data = betaResult,n =NULL,method ="power")

R packages required forrunning ecocbo

Participating institutions


[8]ページ先頭

©2009-2026 Movatter.jp