Re: [R-sig-phylo] Model Selection and PGLS

2021-07-08 Thread Cecile Ane
Alternatively, you could use Rphylopars (https://github.com/ericgoolsby/Rphylopars), so you don’t need to code predictions by hand. I included a reproducible example below, using a single variable. You could use multiple variables to take advantage of the correlation between variables for

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-07 Thread Russell Engelman
Dear All, Just sending a message to see if my last email went through. The code for the PGLS still doesn't seem to work: it's giving results contradictory to what would be expected based on the data (e.g., mu should be extremely negative for Monotremata, but it's very variable among the three

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-04 Thread Julien Clavel
; neovenatori...@gmail.com Objet : Re: [R-sig-phylo] Model Selection and PGLS   All true.  I would just add two things.  First, always graph your data and do ordinary OLS analyses as a reality check. Second, I think this is the original paper for phylogenetic prediction: Garland, Jr., T., and A. R. Ives

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-04 Thread Simone Blomberg
n De : R-sig-phylo de la part de Theodore Garland Envoyé : mercredi 30 juin 2021 03:26 À : Cecile Ane Cc : mailman, r-sig-phylo ; neovenatori...@gmail.com Objet : Re: [R-sig-phylo] Model Selection and PGLS All true. I would just add two things. First, always graph your data and do o

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-04 Thread Julien Clavel
the prediction (see the references above). Cheers, Julien De : Russell Engelman Envoyé : jeudi 1 juillet 2021 06:20 À : Julien Clavel Cc : Theodore Garland ; Cecile Ane ; mailman, r-sig-phylo Objet : Re: [R-sig-phylo] Model Selection and PGLS   Dear All, What you see is the large uncer

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-04 Thread Simone Blomberg
sults obtained across all the trees… Julien De : R-sig-phylo de la part de Theodore Garland Envoyé : mercredi 30 juin 2021 03:26 À : Cecile Ane Cc : mailman, r-sig-phylo ; neovenatori...@gmail.com Objet : Re: [R-sig-phylo] Model Selection and PGLS All true. I would just add two things. First, a

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-04 Thread Theodore Garland
t;> manuscript [the manuscript is already about 90 pages] and deviate from > the > >> scope of the study), but I'm sure you know that most regression analyses > >> nowadays require some sort of preliminary PCM to be acceptable. > >> > >> Sincerely, > >

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-03 Thread Russell Engelman
> > C is the full variance-covariance matrix, made from the tree that includes > both the known and unknown species. CCompletedata is the > variance-covariance matrix WITHOUT the unknown species. This corresponds to > C in Ted and Tony's paper. cihmat is the matrix of relationships of the >

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-02 Thread Simone Blomberg
I knew there would be a mistake somewhere. Here is the correction: ## C <- 1+(lambda-1)*(1-mat) ## Lambda correction WRONG!! C <- (lambda*mat)+(1-lambda)*diag(diag(mat)) ## correct, I think.. I tested it on a toy example of a tree with 5 species and it works fine.. I hope there are no other

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-02 Thread Russell Engelman
Dear All, Okay, so I tried the code that Dr. Blomberg provided, and it doesn't seem to work. I rewrote the code slightly in order for it to try and predict the body mass of the taxa used to calculate the line, rather than some new taxon, because I need to do that in order to calculate prediction

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-02 Thread Chris Organ
he fitted line but should incorporates > >> information from the (evolutionary here) model. > >> > >> For multivariate linear model you can also do it by specifying a tree > >> including both the species used to build the model and the ones you want to > >&g

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-01 Thread Russell Engelman
Dear All, Okay, I've read all of the papers that people have linked, and I have an understanding of the theory. However, where I am struggling now is trying to figure out how to actually perform a PGLS that incorporates signal when predicting new data in R. I tested a bunch of gls functions in

Re: [R-sig-phylo] Model Selection and PGLS

2021-07-01 Thread Cecile Ane
On Jun 30, 2021, at 11:20 PM, neovenatori...@gmail.com wrote: This is something that seems really, really concerning because if there is a method of using phylogenetic covariance to adjust the position of new data points it seems like a lot of workers don’t

Re: [R-sig-phylo] Model Selection and PGLS

2021-06-30 Thread Theodore Garland
fying a tree >> including both the species used to build the model and the ones you want to >> predict using the “predict” function in mvMORPH (I think that Rphylopars >> can deal with multivariate phylogenetic regression too). >> >> Regarding the model comparison, I

Re: [R-sig-phylo] Model Selection and PGLS

2021-06-30 Thread Russell Engelman
h to accommodate between your BM and OLS case > and summarize the results obtained across all the trees… > > Julien > > > De : R-sig-phylo de la part de > Theodore Garland > Envoyé : mercredi 30 juin 2021 03:26 > À : Cecile Ane > Cc : mailman, r-sig-phylo ; > neove

Re: [R-sig-phylo] Model Selection and PGLS

2021-06-29 Thread Cecile Ane
Hi Russel, What you see is the large uncertainty in “ancestral” states, which is part of the intercept here. The linear relationship that you overlaid on top of your data is the relationship predicted at the root of the tree (as if such a thing existed!). There is a lot of uncertainty about

Re: [R-sig-phylo] Model Selection and PGLS

2021-06-29 Thread Theodore Garland
All true. I would just add two things. First, always graph your data and do ordinary OLS analyses as a reality check. Second, I think this is the original paper for phylogenetic prediction: Garland, Jr., T., and A. R. Ives. 2000. Using the past to predict the present: confidence intervals for

Re: [R-sig-phylo] Model Selection and PGLS

2021-06-29 Thread Theodore Garland
The other possible null model would be a "star" phylogeny with no hierarchical structure, equal-length branches, and also Brownian motion. But that's generally viewed as outside of the range of reasonable possibilities. Cheers, Ted On Tue, Jun 29, 2021 at 12:05 PM Nathan Upham wrote: > Hi

Re: [R-sig-phylo] Model Selection and PGLS

2021-06-29 Thread David Bapst
Hi all, Russell, Nate, I took an interest with some of the commentary here, so here's my two cents. > I was surprised that AIC would vary this much in a dataset where the trait > data, number of tips, and branching > topology used to compute the model are more or less constant between trees. I

Re: [R-sig-phylo] Model Selection and PGLS

2021-06-29 Thread Nathan Upham
Hi Russell and all, sounds good. I’d suggest that the “null model” for fitting trait data to a phylogeny should be single-rate Brownian motion, i.e., you’re assuming that given data on the ancestor-to-descendant relationships of the species (and timing of divergences), and assuming the trait

Re: [R-sig-phylo] Model Selection and PGLS

2021-06-28 Thread Russell Engelman
Dear Dr. Upham (and All), Please don't take my initial message the wrong way, this is not meant to be a dig at your 2019 study. I don’t think this is due to the birth-death tree specifically but would be present in any study where there are multiple phylogenetic trees to choose from or some

Re: [R-sig-phylo] Model Selection and PGLS

2021-06-28 Thread Nathan Upham
Hi Russell and all: I’ll respond here since the answer is related to the intended purpose of the VertLife mammal trees — i.e, capturing full uncertainty in node ages and phylogenetic relationships was one of the motivators for building the mammal trees in the way we did. This approach

[R-sig-phylo] Model Selection and PGLS

2021-06-28 Thread Russell Engelman
Dear R-Sig-Phylo Mailing List, I ran into a rather unusual problem. I was doing an analysis using the mammal trees from Upham et al. (2019) downloaded off of the VertLife site. The model statistics for my data initially suggested that the OLS model was better supported than a PGLS model based on