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

commonalities from the PartR2 output #8

Open
narunpat opened this issue Jul 20, 2022 · 0 comments
Open

commonalities from the PartR2 output #8

narunpat opened this issue Jul 20, 2022 · 0 comments

Comments

@narunpat
Copy link

Thank you so much for creating a neat package!

I have been looking for a package to do commonality analyses in a mixed model.

In your PeerJ article, you said “The package does not report partial R2 and commonalities, although they could be calculated from the partR2 output.”. I am now trying to use the formulae you gave in Figure 1 of the article.

I would greatly appreciate it if you can double-check my calculation below.

From the biomass example, here are the Part R2 results from the package.

#> R2 (marginal) and 95% CI for the full model:
#> R2 CI_lower CI_upper nboot ndf
#> 0.5133 0.4136 0.5889 100 4
#>
#> ----------
#>
#> Part (semi-partial) R2:
#> Predictor(s) R2 CI_lower CI_upper nboot ndf
#> Model 0.5133 0.4136 0.5889 100 4
#> SpeciesDiversity 0.1729 0.0322 0.2792 100 3
#> Temperature 0.3058 0.1842 0.3966 100 3
#> Year 0.0140 0.0000 0.1362 100 3
#> SpeciesDiversity+Temperature 0.4916 0.3918 0.5663 100 2
#> SpeciesDiversity+Year 0.1862 0.0475 0.2913 100 2
#> Temperature+Year 0.3276 0.2091 0.4155 100 2
#> SpeciesDiversity+Temperature+Year 0.5133 0.4136 0.5889 100 1

To compute commonalities, here what I did:

Commonalities (SpeciesDiversity & Temperature):
Part (SpeciesDiversity+Temperature) – Part (SpeciesDiversity) – Part (Temperature)
= 0.4916 - 0.1729 - 0.3058 = 0.0129

Commonalities (SpeciesDiversity & Year):
Part (SpeciesDiversity+Year) – Part (SpeciesDiversity) – Part (Year)
= 0.1862 - 0.1729 - 0.0140 = -0.0007

Commonalities (Temperature & Year):
Part (Temperature+Year) - Part(Temperature) – Part(Year)
= 0.3276 - 0.3058 - 0.0140 = 0.0078

Commonalities (SpeciesDiversity & Temperature & Year):
Part (SpeciesDiversity+Temperature+Year) – Part (SpeciesDiversity+Temperature) - Part (SpeciesDiversity+Year) - Part (Temperature+Year) + Part (SpeciesDiversity) + Part (Temperature) + Part (Year)
= 0.5133 - 0.4916 - 0.1862 - 0.3276 + 0.1729 + 0.3058 + 0.0140
= 0.0006

Does it sound reasonable?

If so, I have two questions:

  1. How do we obtain confidence intervals for the commonalities?
  2. What does it mean when we have a negative commonality.

Thank you again,

Narun

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

No branches or pull requests

1 participant