Hi Chris,

It is not clear from your message where the error occurred. Can you please send 
a reproducible example? I don't think the last model fit (output named 'OLS') 
gives an error since gls() with no correlation structure is equivalent to using 
lm().

Also if you use fixed=1 this is the same thing than fixed=TRUE, not value=1 
(supposing this is what you want to do) altough this is likely to not make a 
difference here.

Best,

Emmanuel

----- Le 16 Déc 20, à 0:42, chris pestana pestanach...@gmail.com a écrit :

> Hi when I execute the code below I get the following message:
> 
> Error in corFactor.corStruct(object) :
>  NA/NaN/Inf in foreign function call (arg 1)In addition: Warning
> message:In Initialize.corPhyl(X[[i]], ...) :  No covariate specified,
> species will be taken as ordered in the data frame. To avoid this
> message, specify a covariate containing the species names with the
> 'form' argument.
> 
> 
> If I used fixed=1, it resolves the problem, but wouldn't this impact my
> model selection structure as lambda is not permitted to vary?
> 
> 
> hominin_char<-read.csv("dropped-tips.csv", header=T, row.names=1)
> hominin_char
> tree1<-drop.tip(tree1, tip = c("African_H_erectus_DAN5_P1", "K_platyops"))
> #########################################
> 
> ############
> 
> plot(tree1)
> ########### This is a method for selecting a scalable model for
> encephalization
> BM<-gls(log(Brain_mass)~log(Body_mass),
>         data=hominin_char,correlation=corBrownian(1,phy=tree1),
> method="ML")
> 
> OU<-gls(log(Brain_mass)~log(Body_mass), data=hominin_char,
>        correlation=corMartins(1, phy=tree1), method="ML")
> 
> Lambda<-gls(log(Brain_mass)~log(Body_mass),
>             data=hominin_char, correlation=corPagel(1, phy=tree1),
> method="ML")
> 
> EB<-gls(log(Brain_mass)~log(Body_mass), data=hominin_char,
> correlation=corBlomberg(1, phy=tree1, fixed=TRUE),
>        method="ML")
> 
> OLS<-gls(log(Brain_mass)~log(Body_mass), data=hominin_char, method="ML")
> 
> summary(Lambda)
> Cand.models = list()
> Cand.models[[1]] = BM
> Cand.models[[2]] = OU
> Cand.models[[3]] = Lambda
> Cand.models[[4]] = EB
> Cand.models[[5]] = OLS
> 
> Modnames = paste(c("BM","OU", "Lambda", "EB", "OLS"), sep = " ")
> aictab(cand.set = Cand.models, modnames = Modnames, sort = T)
> 
>       [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to