runs.test | R Documentation |
This function calculates the number of runs of successive positive or negative deviations from theta (if model = stasis) or the mean of the data. This function is used by other functions and will generally not be used directly by users.
runs.test(x, model, tt = NULL, theta = NULL, int = NULL, mstep = NULL)
x |
vector of sample means |
model |
the model being evaluated |
theta |
the value of theta if model = stasis |
The runs test is applied to the sign of the residuals (i.e. θ – trait value) to identify series that have non-random patterns in the sign of deviations. For a time series of length n, the number of runs (one run is a sequence of consecutive numbers with same sign), is approximately normal with mean μ=(2(n_+*n_-))/n+1 and variance (μ-1)(μ-2)/(n-1), where n+ and n- are the number of residuals above and below the optimum respectively.
net evolution
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.