I have a script for pgls with caper
.
I used this exact same script hundreds of times before, and it always worked.
Today, I'm getting an error running it:
Error in solve.default(V, tol = .Machine$double.eps) : system is computationally singular: reciprocal condition number = 1.38603e-17
I can't understand that!!!! I've runned this before! I even have results for this model!!! And now it wont run!!
I saw many questions on this kind of error here in stack, mostly related to highly correlated variables... but I have already removed correlated variables. And also, this code runned before. Why not now?
library(caper)
#Defining data for pgls... phylogeny, variables, taxa names...
maxillariinae <- comparative.data(Tree_max, data.2, av_spp_code, vcv=TRUE, vcv.dim=2)
#Fit the model
pgls95a <- pgls(av_X2n ~ av_mT_dayn_rg+ av_Isotherm+ av_T_season+ av_mT_wet_Q+ av_mT_warm_Q+ av_mT_cold_Q+ av_P_season+
av_P_wet_Q+ av_P_dry_Q+ av_P_warm_Q+ av_P_cold_Q+ av_elevation+ life_forms+ exc_epiph, maxillariinae)
I've deleted one by one all variables and runned the model again, until I had only one variable, but I got the exact same error each time, no matter which variable I'd excluded.
I have also unloaded all packages and loaded again only the necessary ones, but it didn't get my code to work as it did before. Any tips are welcome