marray_wtd: Construct m-ij array with weighted probability

Description Usage Arguments Details Value Examples

Description

Construct m-ij array with weighted probability

Usage

1
marray_wtd(CH, n_occ)

Arguments

CH

Input file made by format_dat() function.

n_occ

Total detection events including the trawl.

Details

It needs pre-assigned weights to calculate weighted m-ij. If all weights are the same, the results are the same as the unweighted m-ij.

Value

m-ij array

Examples

1
2
3
4
5
6
# pre-assign weights for intergrated and segregated populations
intgr<- 234012/(234012+813874) # 2014 CW
segr <- 813874/(234012+813874) # 2014 AD
# make input file, specify weighted sampling
wgt_data<- format_dat('C:/Users/bobbyhsu/Documents/Temp/SR HCH 2014 MCCA.csv', wgt='y')
marray(wgt_data, n_occ= 8)

boppingshoe/bootylator documentation built on May 8, 2019, 1:01 p.m.