BenjaminPeter / rangeexpansion

11 stars 2 forks source link

P-values above 1 #4

Open SoraiaB opened 5 years ago

SoraiaB commented 5 years ago

Hi,

I have come across an issue with this package regarding p-values well above 1. Do you have any idea why this happens?

E.g.

             YOB2000     YOB2001     YOB2002     YOB2003     YOB2004

longitude 148.232 148.2689 148.2756 148.1876 148.2922 latitude -41.9827 -42.23791 -42.2286 -42.04360 -42.11901 q 0.01257047 0.0022600 0.002127 0.0025226 0.01747973 r1 0.9754756 0.9955002 0.9957622 0.9949801 0.9662214 r10 0.799099 0.9567532 0.959179 0.9519705 0.7409633 r100 0.2845684 0.6886977 0.7014675 0.6646607 0.2224226 d1 0.4017754 2.234658 2.373453 2.002075 0.288935 rsq 0.5656125 0.030785 0.6523387 0.122204 0.154597 pval 7.376079 3423.064 0.05801713 4.0153 2.111176e-18

I'm not setting the population parameter because this is a single panmictic population and I am trying to see where recolonization of a given area occurred from.

Thanks, Soraia

rmarquezp commented 4 years ago

Looking at the code of thesummary.origin.results function it seems like p.values are multiplied times 10^4 : res.data <- ( c( coords_orig, q*1000, r1, r2, r3, d1pc/1000, smry$adj.r.squared, smry$coefficients[2,4] * 10^4) ) res.data <- as.data.frame(t(res.data)) names(res.data) <- c("longitude", "latitude", "q", "r1","r10","r100", "d1","rsq","pval") return(res.data)

I'm not sure at all, but I'd assume this is due to correction for multiple testing?