Duke Wiki  logo
Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


#convert kilograms to grams
data_primates$Mass_gm = data_primates$Mass_kg*1000
#take the natural logarithm of grams
data_primates$Log_Mass_gm = log(data_primates$Mass_gm)

Take a look at the two new columns of data you added to your dataframe:



Then call "brownian". R will print the following



[1] -30.98123
[1] 0.02371125
[1] 65.96246
[1] 66.27825
[1] 2


trend = fitContinuous(tree_primates, data_primates$Log_Mass_gm,model="trend") 

If you type "trend," R will return to the command line:




R will print
[1] 0.6390399


So, the p-value associated with this difference in log likelihoods is not significant, and we do not have evidence that a Brownian model of evolution should be rejected in favor of one with a directional trend.