test.var.het {paleoTS} | R Documentation |
Tests for heterogeneity of sample variances in a paleoTS
object.
test.var.het(y, method = "Bartlett") pool.var(y, nn=NULL)
y |
a paleoTS object |
method |
test to be used; currently only Bartlett's test is implemented |
nn |
if y is a vector of variances, nn is a vector of sample sizes |
Tests for variance heterogeneity among samples. In the absence of evidence for heterogeniety, it may be desirable to replace individual estimates of phenotypic variance with a variance estimate pooled over all samples.
Function pool.var
is used internally in test.var.het
. It returns the value of the pooled variance.
A list with the following elements relevant to Bartlett's test
stat |
test statistic for Bartlett's test |
p.value |
P-vlaue for statistical test |
df |
degrees of freedom, equal to one fewer than the number of samples |
Gene Hunt
Hunt, G. 2007. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology, in press.
Sokal, R. and F. J. Rohlf 1995. Biometry, 3rd Ed.
# generate simulated data with no real variance heterogeneity y <- sim.rw(20, 0, 1) bart <- test.var.het(y) # nonsignificant 95 vpool<- pool.var(y) # create new time series, replacing observed with pooled variance yp<- y yp$vv <- rep(vpool, times=length(yp$vv))