I'm trying to select a model under PCA using independent contrasts. Since PICs need to be forced through the origin I've been using lmorigin for the original regression, but it doesn't appear that stepAIC recognizes it. I keep receiving an error message - "Error in na.fail.default(list(Phenology c(NA_integer_, NA_integer_, : missing values in object" I'm having trouble navigating around this error message, and any suggestions would be appreciated. Thanks! Rose -- View this message in context: http://r.789695.n4.nabble.com/Model-Selection-with-Phylogenetic-Independent-Contrasts-tp3814652p3814652.html Sent from the R help mailing list archive at Nabble.com.
Ben Bolker
2011-Sep-15 16:04 UTC
[R] Model Selection with Phylogenetic Independent Contrasts
rjswift <rosejswift <at> gmail.com> writes:> > I'm trying to select a model under PCA using independent contrasts. Since > PICs need to be forced through the origin I've been using lmorigin for the > original regression, but it doesn't appear that stepAIC recognizes it. I > keep receiving an error message - "Error in na.fail.default(list(Phenology > c(NA_integer_, NA_integer_, : > missing values in object" > > I'm having trouble navigating around this error message, and any suggestions > would be appreciated. >Do you mean "select a model under PIC"? I think you'll be better off posting this to the r-sig-phylo at r-project.org mailing list. lmorigin() [which is in the ape package] is a special-purpose function; the tricky part about fitting regressions through the origin is not fitting them (adding a -1 or a +0 to a model formula does that easily)] but making inferences about the resulting model. Depending on how you want to proceed, you can: 1. examine the permutation p-values produced by lmorigin() and do your stepwise procedure by hand; 2. fit through the origin using lm(y~...-1,...) and use stepAIC as usual However, I'm not sure which of this will be *correct* -- you're likely to get wiser comments on r-sig-phylo. In any case, beware stepwise fitting approaches!
Seemingly Similar Threads
- How to colour the tip labels in a phylogenetic tree
- Package check using --as-cran
- Mixed effects model with a phylogenetic tree/ distance matrix as a random effect
- R: Colouring phylogenetic tip labels and/or edges
- Package seems to be present but library don't find it