Hello
I am trying to calculate sigma squared values under the Hansen OU model of
evolution, so as to examine rate of evolution of certain characters.
I have used PCA to reduce the dimensionality of my data and would like to
get sigma squared values for the top 4 PC scores.
I am using the OUCH package, and have succeeded in getting results, but the
sigma squared values seem incredibly large.
The PC data looks like this:
> head(spdata)
Score1 Score2 Score3 Score4
HapUni -0.145379 -0.6747320 -0.7392243 -1.34553078
PhrPle -4.350328 0.9049652 1.0199397 0.24838370
PhrUni -3.586409 0.9624709 0.0682498 0.23511329
XenPar -3.601509 1.6425747 0.2581034 0.07927267
PhrDor -5.977901 0.5893070 1.9651834 0.54601353
PhrEry -5.707650 1.5844235 1.8148729 -0.31778757
and the resulting variance-covariance matrix looks like this:
> coef(h1)$sigma.sq.matrix
[,1] [,2] [,3] [,4]
[1,] 142.79238 112.23323 -42.86343 182.90860
[2,] 112.23323 149.15931 -22.40858 111.64635
[3,] -42.86343 -22.40858 29.09922 -26.99329
[4,] 182.90860 111.64635 -26.99329 388.98963
Am I doing this correctly? Or are these large values the result of
incorrect methodology?
Any advice or suggestions would be greatly appreciated!
The tree and data can be downloaded
here<http://dl.dropbox.com/u/34644229/Clade3.zip>
.
require(ouch)
require(ape)
#Read in tree and data
setwd("/Users/Pascal/Desktop/Spec records/clade3")
tree<-read.nexus("clade3.nex")
spdata<-read.csv("clade3_pc.csv")
rownames(spdata)<-spdata$X
spdata$X<-NULL
head(spdata)
#Fit OU model
ot<-ape2ouch(tree)
otd<-as(ot,"data.frame")
spdata$labels<-rownames(spdata)
otd<-merge(otd,spdata,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")
h3<-hansen(tree=ot,data=otd[colnames(spdata)[1:4]],regimes=otd["regimes"],sqrt.alpha=c(1,0,0,0,1,0,0,1,0,1),sigma=c(1,0,0,0,1,0,0,1,0,1),maxit=1000000)
summary(h1)
-Pascal Title
--
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
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo