ericgoolsby / Rphylopars

Phylogenetic Comparative Tools for Missing Data and Within-Species Variation
28 stars 11 forks source link

Confidence intervals calculated incorrectly in anc.recon #23

Closed jgvw89 closed 4 years ago

jgvw89 commented 5 years ago

The formula you have in the code is: if(CI) { lower <- Yhat + qnorm(.975)var upper <- Yhat - qnorm(.975)var

but confidence intervals should be calculated by multiplying qnorm(.975)*sqrt(var)

Sorry if this is the wrong forum for bringing this up.

cecileane commented 5 years ago

You are correct! Eric, this is in phylopars_update.R, l.49

ericgoolsby commented 4 years ago

Ah yes, thanks for catching this! The code has now been corrected (as of version 0.2.11)