Learn R Programming

spiders (version 1.2)

simPref: simulate data

Description

simulate data for predator preferences model

Usage

simPref(S, T, J, I, lambda, gamma, EM = F)

Arguments

S
number of prey species
T
number of time periods
J
scalar or vector (of length T) number of predators caught at each time
I
scalar or vector (of length T) effective number of traps at each time
lambda
matrix of rates at which predator eats prey species; TxS
gamma
matrix of rates at which prey species is seen in habitat; TxS
EM
boolean specifying test of EM algorithm

Value

A list consisting of two dataframes, eaten and caught, made specifically for the function predPref.

Details

Both lambda and gamma must be specified as a matrix with rows indexing time and columns indexing the number of species.

See Also

predPref