[R-sig-ME] sparse Matrix from phylo object in MCMCglmm
Jarrod Hadfield
j.hadfield at ed.ac.uk
Tue Sep 11 18:24:05 CEST 2012
Hi,
You will be best pruning the phylogeny for each data set. You should
get the same answer if you don't, but it may take longer (both time
per iteration, and more iterations because of slower mixing). Just
creating a covariance matrix for the tips is generally a bad idea
unless the phylogeny is small. Retaining internal nodes allows a
sparser inverse, and retains structure that algorithms for efficiently
solving sparse linear systems can recognise and exploit.
The default is to scale the distance from root to tip to one unit. If
the tree is non-ultrametric this is not possible, and you will get an
error saying the tree cannot be scaled. You can leave it unscaled, or
stretch the tree to be ultrametric and then scale.
Cheers,
Jarrod
Quoting Luis Verde <luisd at ciencias.unam.mx> on Fri, 7 Sep 2012 17:02:54 +1000:
> Hi,
>
> I've been using MCMCglmm to do ordinal regressions with phylogenetic
> structure. At the moment I've been using the ginverse argument, and a
> sparse inverse matrix created with
>
>> inverseA(phylo.object)$Ainv
>
> after running MCMCglmm, I get the warning that "some combinations in animal
> do not exist and missing records have been generated"
>
> I assume this is because internal nodes are part of the inverse matrix and
> I only have data for the tips. If I then only use a subset of my data, I
> get the same warning; but my parameter estimates seem reasonable. Does the
> program skip these rows internally? I tried to create a matrix for tips
> only and I would always end up with a matrix too large in size that would
> crash the computers. This wouldn't happen when using all nodes.
>
> My question is, should I be pruning my tree to match every subset of data
> and then generating an inverse matrix for tips only? Is the default por
> inverseA to scale branch lengths?
>
> best regards,
>
> Luis
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the R-sig-mixed-models
mailing list