# getPCtol: determine the minimum ratio for two subsequent eigenvalues to... In Morpho: Calculations and Visualisations Related to Geometric Morphometrics

 getPCtol R Documentation

## determine the minimum ratio for two subsequent eigenvalues to be considered different

### Description

determine the minimum ratio for two subsequent eigenvalues to be considered different

### Usage

```getPCtol(n, expect = 2)
```

### Arguments

 `n` sample size `expect` expectation value for chi-square distribution of df=2

### Value

returns the minimum ratio between two subsequent subsequent eigenvalues to be considered different.

### References

Bookstein, F. L. Measuring and reasoning: numerical inference in the sciences. Cambridge University Press, 2014

`getMeaningfulPCs`

### Examples

```## reproduce the graph from Bookstein (2014, p. 324)
## and then compare it to ratios for values to be considered
## statistically significant
myseq <- seq(from=10,to = 50, by = 2)
myseq <- c(myseq,seq(from=50,to=1000, by =20))
ratios <- getPCtol(myseq)
plot(log(myseq),ratios,cex=0,xaxt = "n",ylim=c(1,5.2))
ticks <- c(10,20,50,100,200,300,400,500,600,700,800,900,1000)
axis(1,at=log(ticks),labels=ticks)
lines(log(myseq),ratios)
abline(v=log(ticks), col="lightgray", lty="dotted")
abline(h=seq(from=1.2,to=5, by = 0.2), col="lightgray", lty="dotted")

## now we raise the bar and compute the ratios for values
## to be beyond the 95th percentile of
## the corresponding chi-square distribution:
ratiosSig <- getPCtol(myseq,expect=qchisq(0.95,df=2))
lines(log(myseq),ratiosSig,col=2)

```

Morpho documentation built on Feb. 16, 2023, 10:51 p.m.