Learn R Programming

placer (version 0.1.3)

plastic.prev.prob: Plastic prevalence probability

Description

plastic.prev.prob estimates the prevalence probability of plastic from a randomly selected sample of absence/presence observations of plastic debris.

Usage

plastic.prev.prob(plastic_abs_pres, num_sample)

Arguments

plastic_abs_pres

numeric vector, containing a binary values with 0 or 'no' for absence of plastic, and 1 or 'yes' for presence of plastic.

num_sample

integer value, specifying the number of samples to randomly draw from the observations.

Value

Prevalence probability of plastic debris in a given sample size.

See Also

plastic.ci, prevalence_plot

Examples

Run this code
# NOT RUN {
plastic.prev.prob(rbinom(1000,1,0.5), 1)
plastic.prev.prob(rbinom(1000,1,0.5), 10)
# }

Run the code above in your browser using DataLab