Dear Karla.

You could try & create your own logLik method for the object class 
"brownie.lite" as follows:

## method
logLik.brownie.lite<-function(object,...){
        lik<-setNames(
                c(object$logL1,object$logL.multiple),
                c("single-rate","multi-rate"))
        attr(lik,"df")<-c(object$k1,object$k2)
        lik
}
## fit model
fit<-brownie.lite(tree,x)
## use it
logLik(fit)
AIC(fit)

All the best, Liam

Liam J. Revell
Associate Professor, University of Massachusetts Boston
Profesor Asistente, Universidad Católica de la Ssma Concepción
web: http://faculty.umb.edu/liam.revell/, http://www.phytools.org

Academic Director UMass Boston Chile Abroad (starting 2019):
https://www.umb.edu/academics/caps/international/biology_chile

On 9/5/2019 9:13 AM, Karla Shikev wrote:
> [EXTERNAL SENDER]
> 
> Dear all,
> 
> I've been trying to use brownie.lite to implement the tutorial available
> here 
> (https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftreethinkers.org%2Ftutorials%2Fmorphological-evolution-in-r%2F&amp;data=02%7C01%7Cliam.revell%40umb.edu%7Cacb98c128374458b48a708d73202efd0%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C637032860521435814&amp;sdata=rOvlxUCu350av35%2F0BzDM4Zh9H7qYgM12wxrY%2BUxjUE%3D&amp;reserved=0)
>  to
> calculate model-averaged rates of evolution and for model selection (1
> versus 2 rates). However, the current version of phytools 0.6-99 won't
> produce AICc estimates. Does anyone know a way around this? Any help would
> be greatly appreciated.
> 
> thanks a bunch,
> 
> Karla
> 
>          [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylo&amp;data=02%7C01%7Cliam.revell%40umb.edu%7Cacb98c128374458b48a708d73202efd0%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C637032860521435814&amp;sdata=J%2FfE7pM%2B2Fukk%2FJbisMjVg57%2FV0gZFRrAP1GMMlKEm4%3D&amp;reserved=0
> Searchable archive at 
> https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2F&amp;data=02%7C01%7Cliam.revell%40umb.edu%7Cacb98c128374458b48a708d73202efd0%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C637032860521445801&amp;sdata=UOardufWViBYLfmv3Py7%2BORn%2BaTNylcRAgmjN3AhvlI%3D&amp;reserved=0
> 
_______________________________________________
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