NEON-biodiversity / Ostats

O-statistics (community pairwise niche overlap statistics)
https://neon-biodiversity.github.io/Ostats/
Other
7 stars 2 forks source link

Documentation and vignette for Ostats_multivariate #22

Closed qdread closed 2 years ago

qdread commented 3 years ago

I just did a pull request of the branch where I was working on the hypervolume stuff, then merged it with the master branch.

So now the Ostats_multivariate() function is included in the main package. The internal functions pairwise_overlap() and community_overlap_merged() have also been modified so that they work with the multivariate data.

I think I already updated the documentation for the internal functions well enough. However, I did not really write any documentation for Ostats_multivariate(). We will need to do that. Much of it is possible to copy from Ostats().

Also, we may want to write a second vignette for multivariate. It should show how you can take a multivariate dataset and use Ostats() to individually get the overlap stats for each trait separately, and Ostats_multivariate() to get a hypervolume-based overlap stat for all traits together.

@yyue-r @isafluck Interested in helping with this?

qdread commented 3 years ago

I did a little bit of the documentation but still needs work ...

isafluck commented 3 years ago

Great! I can totally help with the writing of the function and vignette! So the multivariate vignette would be a vignette similar to Ostats' vignette, right? What would change is the context of using the Ostats function? We can discuss this further at the meeting today. Then I start writing!

Best,

Isadora Fluck Essig Laboratory of Theoretical and Applied Ecology Universidade Federal de Santa Maria Santa Maria - RS, Brasil

[image: Mailtrack] https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5& Remetente notificado por Mailtrack https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5& 29/10/20 14:33:52

Em qua., 28 de out. de 2020 às 14:24, Quentin Read notifications@github.com escreveu:

I did a little bit of the documentation but still needs work ...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NEON-biodiversity/Ostats/issues/22#issuecomment-718088437, or unsubscribe https://github.com/notifications/unsubscribe-auth/APUWLKYH7WXL5HE5UVZSVJTSNBHT5ANCNFSM4TCNUK7Q .

qdread commented 3 years ago

Another thing we'd need for the vignette is a good example dataset. We should use something relevant instead of the crappy iris dataset.

qdread commented 3 years ago

Just to update, I'm still looking for example datasets to use in the vignette, and the help documentation for Ostats_multivariate is not yet written. Hopefully I will be able to get to it soonish.

sydnerecord commented 3 years ago

I've put an example data set into our shared G drive here. Let me know if you have any questions. We probably only need a subset of sites for the example data. It's a big data set that I'm working on a paper for, so let's not publish all the data with the vignette.

qdread commented 3 years ago

Thanks @sydnerecord! That's a big help. Of course if we end up using this in the vignette it'd only be a small and anonymized subset. I can even add random noise to the data if you want.

qdread commented 3 years ago

@sydnerecord I'm tagging you again here to see whether you would be able to take a look at the vignette outline I wrote, and add details or background about the pitcher plants. Also, I thought it would be a good idea to scale all the traits relative to pitcher width just so that they were more comparable among species (i.e. we are comparing shape and not just size). I just came up with that off the top of my head so if you have a more biologically informed idea for how to do that, that'd be great. The snippet of code where I took the ratios is here: https://github.com/NEON-biodiversity/Ostats/blob/master/vignettes/multivariate-Ostats.Rmd#L77-L83

qdread commented 3 years ago

@isafluck I also assigned you here per our discussion about adding some background out of the lit about niches/traits. For the vignette 1 paragraph is probably adequate, but more will be needed for the publication.

sydnerecord commented 3 years ago

@qdread I'll take a look at the vignette outline and add details about the pitcher plants. Per your question about scaling the traits, we should take the approach that's been taken in the literature on these same traits for pitcher plants in the past for multivariate analyses: standardized (transformed into standard- deviation units, or Z scores). Does that make sense to you?

qdread commented 3 years ago

Yes, I standardized them already. I also took ratios of everything divided by pitcher width just to remove size dependence of the traits, if that is not a correct way to do it please change! 😃

qdread commented 3 years ago

Commit f8ec818 adds documentation for the two multivariate functions. Maybe could also add an example for each? But mainly just the vignette needs to be done.

qdread commented 2 years ago

Just going through old issues getting ready to make a new cran release. I think we are good here, the vignette is complete for multivariate. So I am going ahead and closing this.