generate_cultural_change: Simulation of cultural change

Description Usage Arguments Details Author(s)

Description

Generates theoretical samples at times tj, j=2,...,nSamples under a specific process of cultural transmission.

Usage

1
generate_cultural_change<-function(iniPop, u, v, b, mutationRate, timePoints, nType, sampleSize, nSamples, n_step_for_sample)

Arguments

iniPop

vector containing the relative population-level frequencies of the cultural variant types at t1

u

number of variants to be removed in every time step

v

number of variants to be added in every time step

b

strength of frequency-dependent selection

mutationRate

mutation rate per transmission event

timePoints

vector specifying the time points tj, j=1,...,nSamples

nType

number of variant types in the population at t1

sampleSize

vector of sample sizes at time points tj, j=1,...,nSamples

nSamples

number of observed samples

n_step_for_sample

number of (theoretical) populations (at time steps t(j-n_step_for_sample+1),...,tj) from which the samples at tj are evenly drawn

Details

This functions generates the theoretical sample-level frequencies of all variant types present in t1 (and an additional type that contains variants not obserevd in the sample at t1) at times tj, j=2,...,nSamples under the cultural transmission process defined in function generate_transmissionProb.

Author(s)

Clementine Straub


annenna4/culturechange documentation built on May 30, 2019, 6:54 p.m.