dPEpoisnorm | R Documentation |
Density function, cumulative distribution function and random generation for the trait change under Pulsed evolution with 1 compound Poisson process
dPEpoisnorm(x, t, lambda, size, sigma, epsilon = 0, margin = 1e-06) pPEpoisnorm( q, t, lambda, size, sigma, epsilon = 0, margin = 1e-06, lower.tail = TRUE ) rPEpoisnorm(n, t, lambda, size, sigma, epsilon = 0)
x |
the trait change between two nodes |
t |
the branch length between two nodes |
lambda |
the rate at which jumps happen |
size |
the variance of trait change introduced per jump |
sigma |
the rate of BM (variance of gradual trait change per unit branch length) |
epsilon |
the variance of time-independent variation |
margin |
the total probability mass of the number of jumps not covered, defaults to 1e-6 |
q |
the trait change between two nodes |
lower.tail |
logical, if TRUE (default), probability of trait change smaller or equal to q is returned. If false, the probability of being greater is returned. |
n |
the number of random values to return |
dPEpoisnorm
returns the probability density
pPEpoisnorm
returns the cumulative distribution
rPEpoisnorm
returns a vector of random numbers following the specified distribution
# generate some random trait changes under pulsed evolution dtrait = rPEpoisnorm(n=1e3,t=1,lambda=1,size=1,sigma=1,epsilon=0.1) # test the empirical distribution against the theoretical one ks.test(dtrait,pPEpoisnorm,t=1,lambda=1,size=1,sigma=1,epsilon=0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.