Thanks for the response, Liam. I just tried out OUwie and it works.
However, it appears to only fit 1 variable at a time (I only get one sigma
squared value).
When running some tests with OUCH, I found that sigma squared is different
when one variable is fit to an OU model, versus when multiple variables are
fit together. Is that expected?

-Pascal

On Mon, Mar 12, 2012 at 11:39 AM, Liam J. Revell <liam.rev...@umb.edu>wrote:

> You might want to try the OUWie package by Beaulieu & O'Meara (
> http://cran.r-project.org/**web/packages/OUwie/index.html<http://cran.r-project.org/web/packages/OUwie/index.html>
> )**. I have not tried it yet, but it promises to do multi-optimum OU
> model fitting as well.
>
> All the best, Liam
>
> --
> Liam J. Revell
> University of Massachusetts Boston
> web: 
> http://faculty.umb.edu/liam.**revell/<http://faculty.umb.edu/liam.revell/>
> email: liam.rev...@umb.edu
> blog: http://phytools.blogspot.com
>
>
> On 3/12/2012 2:31 PM, Pascal Title wrote:
>
>> Hi all
>>
>> I have a dataset of 5 PC axes for a phylogeny with 52 tips and I would
>> like
>> to get the variance-covariance matrix under a global OU model of
>> evolution. I find that OU is strongly favored over BM, based on
>> fitContinuous in GEIGER.
>> However, I am having issues with convergence when trying to fit a hansen
>> model to my data. What can I do to get around this problem? Alternatively,
>> is there another way to get at the multivariate VCV matrix other than with
>> the OUCH package?
>>
>> The error is:
>> *unsuccessful convergence, code 1, see documentation for `optim'*
>> *Warning message:*
>> *In hansen(tree = ot, data = otd[varnames], regimes = otd["regimes"],  :*
>> *  unsuccessful convergence*
>>
>>
>>
>> I have posted a small file that contains the following R script along with
>> the data 
>> here<http://dl.dropbox.com/u/**34644229/OUhansen.zip<http://dl.dropbox.com/u/34644229/OUhansen.zip>
>> >.
>>
>>
>> Any advice would be greatly appreciated! Thanks!
>>
>> require(ouch)
>> require(ape)
>>
>> tree<-read.nexus('tree.nex')
>> data<-read.csv('data.csv')
>> rownames(data)<-data$X
>> data$X<-NULL
>>
>> tree
>> head(data)
>>
>> colnames(data)->varnames #for hansen()
>>
>> ot<-ape2ouch(tree)
>> otd<-as(ot,"data.frame")
>> data$labels<-rownames(data)
>> otd<-merge(otd,data,by="**labels",all=TRUE)
>> rownames(otd)<-otd$nodes
>> ot<-with(otd,ouchtree(nodes=**nodes,ancestors=ancestors,**
>> times=times,labels=labels))
>> otd$regimes<-as.factor("**global")
>> h1<-hansen(tree=ot,data=otd[**varnames],regimes=otd["**
>> regimes"],sqrt.alpha=c(1,0,0,**0,0,1,0,0,0,1,0,0,1,0,1),**
>> sigma=c(1,0,0,0,0,1,0,0,0,1,0,**0,1,0,1))
>>
>>
>>
>>


-- 
Pascal Title

Graduate Student
Burns Lab
http://kevinburnslab.com/
Department of Evolutionary Biology
San Diego State University
5500 Campanile Drive
San Diego, CA 92182-4614

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to