[R-sig-phylo] Transforming data for OU model

2013-11-28 Thread Anna Rice
Hi all,

I am running an OU model on data that is constrained by zero (precipitation
values). Therefore I thought to log transform the data. However I still
have some issues with the transformation:

1. When all values in the data are larger than 1.0, the log transformation
will still result in all values being positive.
2. In case I have a value of zero, log transforming it will give -Inf.

I would greatly appreciate any advice regarding the best way of
transforming and dealing with this kind of data.

Thanks you,
Anna

[[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] Missing states in ancestral reconstruction using constrained Mk2 model

2013-10-07 Thread Anna Rice
Hello,

I'm trying to use the package Diversitree to perform an ancestral
reconstruction using a constrained Mk2 model.
Unfortunately, after running the model and plotting the results I saw that
most of the internal nodes did not get any state (NaN).
Doing exactly the same without the constrain works fine and assigns a state
for all internal nodes.

Any idea why this happens?

Here is the relevant part of code I was using:

lik-make.mk2(tree,states)
lik.m - constrain( lik, q10 ~ 0 )
fit.m - find.mle(lik.m, .1)

st - asr.marginal(lik.m, coef(fit.m)) #same if I use joint reconstruction

And this is what I got for 31 nodes:
 st
 [,1] [,2] [,3].[,23] [,24] [,25]
[1,]1  NaN  NaN   NaN   NaN   NaN
[2,]0  NaN  NaN ...  NaN   NaN   NaN
 [,26]  [,27]   [,28][,29]  [,30]   [,31]
[1,] 0.1770124 0.02323889 0.001580509 0.0003160667 0.05889347 0.002819436
[2,] 0.8229876 0.97676111 0.998419491 0.9996839333 0.94110653 0.997180564


Thanks,
Anna

[[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/