# set parameters
Predators <- Traps <- 100
PreySpecies <- 2
Times <- 5
g <- matrix(sqrt(2), nrow=Times, ncol=PreySpecies) # gamma
l <- matrix(seq(0.4,1.8,length.out=5)*sqrt(2), nrow=Times, ncol=PreySpecies) # ct
# fit model and contrast
## Not run:
# set.seed(0)
# fdata <- simPref(PreySpecies, Times, Predators, Traps, l, g, EM=FALSE) # p-value=0.305
# pref <- predPref(fdata$eaten, fdata$caught, hypotheses=c('ct', 'cst'))
# testC(pref, b = c(0,1, -1, 0, 0)) # p-value > sig.level => ct is used, not cst
# ## End(Not run)
Run the code above in your browser using DataLab