[RsR] Question about regression with R with CAPER

Kjell Konis kje||@kon|@ @end|ng |rom me@com
Tue Apr 9 18:16:32 CEST 2013


Hi Xavier,

This list is specifically for questions/discussion about robust statistics. You will have better luck getting an answer to your question if you ask on R-help.

Cheers,
Kjell

On Apr 9, 2013, at 1:09 AM, Xavier Prudent <prudentxavier using gmail.com> wrote:

> Dear R experts,
> 
> 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]]
> 
> _______________________________________________
> R-SIG-Robust using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-robust




More information about the R-SIG-Robust mailing list