Learn R Programming

artemis: an R package for eDNA analysis

The artemis package was created to aid in the design and analysis of eDNA survey studies by offering a custom suite of models for eDNA sampling and qPCR data. It implements a set of Bayesian latent-variable, truncated data models which are fit using Stan.

Installation


install.packages("artemis")

Testing your installation

If your installation of artemis and its dependencies was successful, the following code should run without error (although you may see warning messages from rstan about Bulk/Tail Effective Samples Sizes being too low). If the first or second model returns an error that seems to have something to do with your c++ compiler, you may need to follow instructions to edit your Makevars or Makevars.win file.

library(artemis)

model_fit = eDNA_lm(Cq ~ scale(Distance_m) + scale(Volume_mL), 
                    data = eDNA_data,
                    std_curve_alpha = 21.2, std_curve_beta = -1.5)

model_fit2 = eDNA_lmer(Cq ~ scale(Distance_m) + scale(Volume_mL) + (1|FilterID),
                       eDNA_data,
                       std_curve_alpha = 21.2, std_curve_beta = -1.5)

Installing artemis from source

Installing artemis from source on Windows is not currently well-supported; we recommend installing from the pre-compiled binary if you're on Windows. If you're on MacOS or Linux and you prefer to install from source, then go ahead and do that with your function/utility of choice (devtools::install_github(), utils::install.packages(type = "source"), R CMD INSTALL, etc.).
If you have sub-architecture you're really in to customizing, the source code is here, go nuts.

Basic use

Please refer to the Getting Started with the artemis package vignette, which covers most of the functionality of artemis.

Additional vignettes are forthcoming!

Reporting bugs

Please report all bugs via an issue at the package repo.

Copy Link

Version

Install

install.packages('artemis')

Monthly Downloads

53

Version

1.1.1

License

GPL (>= 3)

Maintainer

Last Published

September 8th, 2021

Functions in artemis (1.1.1)

est_p_detect

Estimate the probability of detection
conf_to_probs

Confidence to probability
artemis-package

The 'artemis' package.
cq_to_lnconc

Convert CQ value to [eDNA]
eDNA_data

eDNA_data
as.data.frame.eDNA_simulation

Methods for eDNA simulations
est_power_lm

Estimate power
eDNA_model-class

eDNA model fit results
eDNA_lm

Fit eDNA Model
print.eDNA_model

Print eDNA model results
eDNA_simulation-class

eDNA simulation results
plot.eDNA_p_detect

Plot p(detect)
plot.eDNA_model

Plot eDNA model results
est_power_range_lm

Estimate power for a range of replicates
sim_eDNA_lm

Simulate eDNA data
lnconc_to_cq

Convert [eDNA] to Cq
summary.eDNA_model

Summary of an eDNA model
summary.eDNA_p_detect

Summary method for eDNA p(detect)
print.eDNA_p_detect

Print eDNA p(detect)
summary.eDNA_simulation

Summary of eDNA simulations
normal

Prior distributions
loo.eDNA_model

Approximate leave-one-out cross-validation
print.eDNA_simulation

Print eDNA simulation
ranef,eDNA_model_lmer-method

Summarize random effect
predict.eDNA_model

Predict eDNA model
plot.eDNA_simulation

Plot method for eDNA simulations
waic.eDNA_model

Approximate leave-one-out cross-validation