Elizabeth Christina Miller
2018-01-29 23:47:42 UTC
Hello,
I am trying to simulate trees under a QuaSSE model where speciation is
linearly related to a trait. However, I keep getting an error related to
specifying the linear function for lambda.
Following the diversitree documentation and vignette, I set up the
arguments, the lower bound and upper bound values that lambda can assume
according to changes in the trait value.
Error in lambda(state) : argument "m" is missing, with no default
I am not sure what argument "m" is. If I input an arbitrary third argument,
When I look at the lambda object, it seems that "m" is the slope of the
{
x[x < x0] <- x0
x[x > x1] <- x1
ans <- m * x + c
ans[ans < 0] <- 0
ans
}
<environment: 0x11604ee70>
However, according to the documentation it is not clear how to input the
slope value to the simulation function, or how to decide what this slope
should be* a priori.*
Any assistance would be greatly appreciated. Thank you!
--
Elizabeth Miller
http://elizabethcmiller.weebly.com/
PhD Candidate: Wiens Lab
Ecology and Evolutionary Biology
University of Arizona
[[alternative HTML version deleted]]
_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
I am trying to simulate trees under a QuaSSE model where speciation is
linearly related to a trait. However, I keep getting an error related to
specifying the linear function for lambda.
Following the diversitree documentation and vignette, I set up the
lambda<- make.linear.x(0, 1)
mu<- function(x) constant.x(x, 0.03)
char<-make.brownian.with.drift(0,0.025)
According to the documentation, the make.linear.x function takes twomu<- function(x) constant.x(x, 0.03)
char<-make.brownian.with.drift(0,0.025)
arguments, the lower bound and upper bound values that lambda can assume
according to changes in the trait value.
tree.quasse(c(lambda,mu,char), max.taxa=20, max.t=Inf,
include.extinct=FALSE, x0=0.1, single.lineage=TRUE, verbose=TRUE)Error in lambda(state) : argument "m" is missing, with no default
I am not sure what argument "m" is. If I input an arbitrary third argument,
lambda<- make.linear.x(0, 1, 2)
Error in make.linear.x(0, 1, 2) : unused argument (2)When I look at the lambda object, it seems that "m" is the slope of the
lambda
function (x, c, m){
x[x < x0] <- x0
x[x > x1] <- x1
ans <- m * x + c
ans[ans < 0] <- 0
ans
}
<environment: 0x11604ee70>
However, according to the documentation it is not clear how to input the
slope value to the simulation function, or how to decide what this slope
should be* a priori.*
Any assistance would be greatly appreciated. Thank you!
--
Elizabeth Miller
http://elizabethcmiller.weebly.com/
PhD Candidate: Wiens Lab
Ecology and Evolutionary Biology
University of Arizona
[[alternative HTML version deleted]]
_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/