met_crvs: Get probability distribution curves

Description Usage Arguments Details Value See Also Examples

Description

Get probability distribution curves from raw metrics for plotting

Usage

1
met_crvs(met_in, scr_in, n = 1000, sdchg = NULL)

Arguments

met_in

input data.frame of coral metrics

scr_in

input data.frame of site BCG scores, see details

n

numeric indicating number of values across the range for each metric to predict the density curves

sdchg

optional named list to manually change standard deviation estimates for each metric, see details

Details

The input scr_in data has two columns labelled station_code and scr. The station codes should match those in met_in. The scr values for each station can be numeric or character string BCG levels that represent qualitative rankings.

The density curves are based on maximum-likelihood estimates of the mean and standard deviation for a normal curve corresponding to the raw metric data at each BCG level.

The distribution curves can be changed by manually entering standard deviation estimates for each metric and BCG score. Ideally, standard deviation estimates should be derived from observations but these values could be manually changed to maximize accuracy of metric scores from expert assignments. The standard deviation estimates can be manually changed using a named list for the element names correspond to one to many metrics and the elements for each is a numeric vector of the values to change (first is highest level, last is lowest). See the examples.

Value

A two-element list named met_in and crvs, where the former is the joined input data with BCG scores in scr_in and the latter is estimated density curves from the raw distributions of each.

See Also

plot_fuzz

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# coral metrics
met_in <- get_stony_mets(crl_dem)

# bcg scores for each station
station_code <- c(1:5)
scr <- c(2, 5, 3, 2, 4)
scr_in <- data.frame(station_code, scr) 

# get curves
met_crvs(met_in, scr_in)

# get curves with manual sd
sdchg <- list(tot_rich = c(2, 2, 2, 2))
met_crvs(met_in, scr_in, sdchg = sdchg)

## End(Not run) 

USEPA/CoralBCG documentation built on May 20, 2019, 3:28 p.m.