Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importance, R^2 and p-values for single env predictors. #73

Closed
JulFrey opened this issue Jul 15, 2021 · 3 comments
Closed

Importance, R^2 and p-values for single env predictors. #73

JulFrey opened this issue Jul 15, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@JulFrey
Copy link

JulFrey commented Jul 15, 2021

Hi,

maybe I just havent found it, but is there a way to see the importance, R^2 and p-value of a single environmental predictor?
e.g.
model <- sjSDM(Y = Occ, env = linear(data = Env, formula = ~X1+X2+X3), spatial = linear(data = SP, formula = ~0+X1:X2), se = TRUE, family=binomial("probit"), sampling = 100L, device = 'gpu' )

Where can I see the contribution of X3 in the model? I I got your outputs correct all predictors from the env argument are summed into A in the anova() and under env in the importance() output?!

Best regards,
Julian

@MaximilianPi
Copy link
Member

MaximilianPi commented Jul 19, 2021

Hi Julian,

there is no central function for everything:

p-values and effect estimates

summary(model)

reports the p-value and the effect estimates of the individual predictors

R2 / analysis of variance

anova(model)

calculates the analysis of variance for the (two) three groups (env, spatial, and biotic).

res = anova(model)
print(res$result)

reports the variances and the R2 values for the three groups, but not for the individual predictors. But we can calculate the variance/R2 for each site (still experimentally):

res = anova(model, individual=TRUE)
dim(res$result)

Variation partitioning

importance(model)

calculates the variation partitioning of the three groups (env, spatial, and biotic) for each species. We could do this also for each predictor, but it is not yet implemented (we will add this feature in the next sub-version)

So we cannot yet calculate the R2 for each single environmental predictor but we will work on this.

Max

@MaximilianPi MaximilianPi added the enhancement New feature or request label Jul 19, 2021
@florianhartig
Copy link
Member

Just to add to this - it would of course be possible to calculate ANOVA for each predictor (and we could implement that), but due to the way we compute the ANOVA (see help) this would be computationally costly.

I'm not quite sure if it's worth it - calculating ANOVA for interactions / collinear variables can be a bit tricky. Depending on what you want to use this for, there can be an advantage of ANOVA over standardised effect sizes, but I think for most users, standardised effect sizes (= scale variables and look at summary), which can be interpreted as relative effect sizes, will be more in line with what they want.

@JulFrey
Copy link
Author

JulFrey commented Jul 20, 2021

Thank you very much for the very helpful replies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants