samplingP: Extracts sample from generated populations

Description Usage Arguments Examples

View source: R/samplingP.R

Description

Extract samples from the genrated populations using 'SimRDS::population' function. Can directly use this output to te RDS estimates in RDS package

Usage

1
2
samplingP (population, seeds, coupon, waves = NULL, size = NULL, prob=NULL, prop_sam = NULL,
showids = T, timeInterval = NULL)

Arguments

population

Population generated using 'SimRDS::population' function. The list output should be fed as the value for this parameter.

seeds

Number of seeds. Should be a positive integer

coupon

Number of coupons. Should be a positive integer

waves

Number of waves. Should be a positive integer

size

Sample size. Should be a positive integer

prob

Whether the seeds are selected probabilistically. If want to be selected randomly then leave ot as 'NULL' If want to relate it to a variable add the variable name and the it should be related. For example if the seeds selected should depend on the network size then 'network' should be used. If it is inversly proportional then should enter as '1/network'.

prop_sam

If the individuals from the network of an individual should be chosen randomly use "NULL". If the selection should be done probabilistically state the variable and how it should be related.

showids

If TRUE displas the IDs beign recruited.

timeInterval

Days between recruitment waves. zeroth wave is assumed to recruit at the present day

Examples

1
samplingP(population, seeds = 10, coupon = 2, waves = 8, prob = '1/network', prob_sum = 'chara')

AyeshaPerera/SimRDS documentation built on Dec. 30, 2019, 6:01 p.m.