Dear R experts,
I hope this is the right list for my question.
As a newcomer in R, I am testing the R CAPER package, applying a simple
regression on a phylogeny tree with three binary traits: (t1, t2, t3).
My goal is to test the sensitivity to a correlation between t1 and t3. But
if a correlation of 100% is considered (i.e. t3 = t1). The pgls method of
CAPER seems to crash:
You can find there the code I used
http://iktp.tu-dresden.de/~prudent/Divers/R/toy.R
with the tree
http://iktp.tu-dresden.de/~prudent/Divers/R/toy3.tree
and the data
http://iktp.tu-dresden.de/~prudent/Divers/R/toy_cor100.data
just copy the .tree and .data files and run> R
> source("toy.R")
(please find the outpt below)
Am I doing anything wrong?
Thanks in advance,
regards,
Xavier Prudent
=================================>>>>>>> Regression #2
Call:
pgls(formula = t1 ~ t3, data = cdat)
Coefficients:
(Intercept) t3
0 1
Call:
pgls(formula = t1 ~ t3, data = cdat)
Residuals:
Min 1Q Median 3Q Max
0 0 0 0 0
Branch length transformations:
kappa [Fix] : 1.000
lambda [Fix] : 1.000
delta [Fix] : 1.000
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0 0 NA NA
t3 1 0 Inf < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0 on 8 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: Inf on 2 and 8 DF, p-value: < 2.2e-16
Error in density.default(res) : 'x' contains missing values
======================
[[alternative HTML version deleted]]