met_dist: Get distribution estimates

Description Usage Arguments Details Value Examples

Description

Get distribution estimates for BCG metrics by level

Usage

1
met_dist(met_in, scr_in)

Arguments

met_in

input data.frame of coral metrics

scr_in

input data.frame of site BCG scores, 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.

BCG levels for each metric are based on the raw metric distributions for the a priori expert rankings of each site. Distributions for each metric at each level are recreated from normal distributions, where the mean and standard deviation of each distribution are based on maximum likelihoods estimates from the raw data.

Value

A two-element list named met_in and pars, where the former is the joined input data with BCG scores in scr_in and the latter is a data.frame with parameter (mean and standard deviation) estimates for each metric at each BCG level.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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 levels
met_dist(met_in, scr_in)

## End(Not run) 

fawda123/coral_bcg documentation built on May 16, 2019, 10:59 a.m.