Reputation: 3
I am running a PGLS loop on 1,000 trees and I am trying to extract slope, standard error, and P-values from my loop. Slope and standard error are easily extracted by using data$model$coef[2]
and data$sterr[2]
but the p value just does not want to come out. I have tried
1)summary(result)$pvalue
which gives value NULL
2)data$model$coef[2,4]
which says this is out of bounds (in fact playing around I couldn't access anything outside of the first column of coefficients without receiving the same error message)
I have tried a slew of other methods that are more or less the same idea as these two and each time I either get the dreaded NULL
, the occasional NA
or the out of bounds
error. Does anyone know what is going on? I know we typically provide the data but this seems like a menial question (although I have spent significantly more time trying to resolve this that in my actual PGLS).
Upvotes: 0
Views: 1722
Reputation: 1894
I do not think it is possible directly See this (old) question. Perhaps the easiest way is to use the summary object to extract the necessary information to calculate it yourself (via a helper function)?
See this also,
Upvotes: 2