phyr icon indicating copy to clipboard operation
phyr copied to clipboard

predicted values with INLA

Open arives opened this issue 4 years ago • 4 comments

Russell,

While updating rr2, I found that the bayes=T version of pglmm returns the "nearest_node" predicted values even when the "tip_rm" option is used. Is there a structural reason for this? For R2_pred, the "tip_rm" option makes more sense.

Thanks, Tony

arives avatar Jun 17 '20 16:06 arives

Here is the function. https://github.com/daijiang/phyr/blob/master/R/pglmm-utils.R#L904-L911

daijiang avatar Jun 18 '20 20:06 daijiang

Thanks Daijiang for the reminder. Looks like I chose to ignore the gaussian.pred option. I think it was because I didn't really know what those two options meant (still not sure), I just wanted to get it working, and planned to come back to it later. But then I forgot to. Could you explain briefly what tip_rm means? Or point to somewhere where it is explained? If it requires predicting with new data, my implementation currently can't do this, but I have been meaning to update it so that it can.

rdinnager avatar Jun 18 '20 22:06 rdinnager

Russell, tip_rm means removing a record (sort of like remove a tip species from a phylogeny) and then using the remaining data to predict the value. nearest_node means after removing the record, make prediction for the most common ancestor instead of itself. @arives probably can correct me and explain better here.

daijiang avatar Jun 18 '20 23:06 daijiang

Daijiang and Russell,

Your explanation of tip_rm matches mine, but I think the prediction of nearest_node includes all of the tip values. I don't think I wrote this code, but maybe I did. Performing the nearest_node prediction with all data is equivalent to what you would do for a random effect – predict the value of the random effect from all data. The problem with phylogenies is that the branch length between tips and nearest nodes can be very short.

I'm not exactly sure what INLA is doing, but the values I get are similar to nearest_node as described above when bayes = F.

Cheers, Tony

From: Daijiang Li [email protected] Reply-To: daijiang/phyr [email protected] Date: Thursday, June 18, 2020 at 6:51 PM To: daijiang/phyr [email protected] Cc: "Anthony R. Ives" [email protected], Mention [email protected] Subject: Re: [daijiang/phyr] predicted values with INLA (#50)

Russell, tip_rm means removing a record (sort of like remove a tip species from a phylogeny) and then using the remaining data to predict the value. nearest_node means after removing the record, make prediction for the most common ancestor instead of itself. @ariveshttps://github.com/arives probably can correct me and explain better here.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/daijiang/phyr/issues/50#issuecomment-646360830, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYX6LESOICEDLFWGILDUTTRXKR7BANCNFSM4OAYVZZQ.

arives avatar Jun 19 '20 00:06 arives