Coder Social home page Coder Social logo

elev_gradient's People

Contributors

dmcglinn avatar t-engel avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elev_gradient's Issues

Build workflow from raw to clean data - fix site id bug

Ideally we want to develop an analysis that is completely reproducible based only the raw data file. Therefore any intermediate steps of processing the data should be coded in R.

With that in mind, we need an R script that imports the raw master data file: ./data/180926-AllRawData.xlsx using one of the R packages that allows reading of excel sheets. That script should then output the two .csv files that other analyses will depend on.

This script should also fix a mistake that I have detected in the field called Code in the All sheet of 180926-AllRawData.xlsx. Specifically, it appears that CATALOOCHEE needs to be replaced with CATA. Otherwise a look up for that sites coordinates will not work. I'll double check with Nate to make sure this is correct.

Cherry picking k-NCN branch to merge with master

Hey @T-Engel I'm going to try to merge your k-NCN branch with the master branch. I'm going to just cherry pick the three commits from Oct 12 onward - the other commits seem to be already in the master branch. I wanted to give you a quick heads up before I do this. After the merge please make sure you update your local branches. If you want to improve an aspect of the code just push to a newly created branch not the old k-NCN one. Thanks!

Keep samples without individuals

Hey @T-Engel, nice job kicking off the analysis! I did want to suggest that we do keep samples without individuals because this is ecologically informative about patterns of patchiness. For the two-scale analysis, I know it will result in some Inf values for beta diversities which can be annoying but for the delta analysis we'll want those zero abundance plots retained so ideally let's just keep the same mob_in object for both analyses. Here's the line of code I would suggest changing so that you remove the rowSums > 0 check.

# exclude samples without individuals

fisher's alpha and sampling effects

I'm having a little trouble with thinking about how to interpret Sander's et al. fisher's alpha results. They interpret the strong negative correlation between fisher's alpha and temperature to indicate that extinction dynamics are playing a role in maintaining diversity is sites with more individuals. This interpretation seems flawed to me because fisher's alpha is independent of N and therefore is a richness estimate that is corrected for numbers of individuals. Its strong correlation actually indicates the opposite that temperature is not modulating S by sampling effects (i.e., N effects). Here's what they write specifically:

It is unlikely that sites with higher temperature have more
species only because local assemblages are simply sampling from
the regional species pool, as the sampling mechanism predicts.
Fisher’s α, which removes the effect of sampling, still tracked
temperature. This result suggests that some sites are more species
rich because those sites have higher abundance, and thus lower
probabilities of extinction. In fact, if we tally the number of
occurrences (the number of 1-m2 quadrats a species is detected
in) as an estimate of abundance (following previous authors:
Kaspari et al., 2000a,b, 2003; Longino et al., 2002) and plot richness
against abundance, the relationship is strong and positive at each
spatial grain and for Fisher’s α (Table 3), indicating that some
sites have more species because the probability of local extinction
is reduced. This result, along with the positive relationship
between Fisher’s α and temperature, supports the abundance–
extinction mechanism.

Can you please let me know if you disagree with my interpretation.

Our own results show N effects are minimal based on patterns of S_n and the estimated N effect from the multi-scale analysis. Thanks!

Scale of IBR constrained by min(N)

The analysis of the IBR is limited to the site with the smallest number of individuals. One site (NODI) has only 6 individuals which means that the scale for the IBR is quite limited. If we drop NODI from the analysis then we get 12 individuals but this is still rather limited. We should think about if there is a creative solution that allows us to consider larger N values for the IBR. This could be done via extrapolation for example. Alternatively, sample size could just be sacrificed at larger values of N. This is relevant because how important you judge the SAD effect depends in part on how large of a scale you consider. This also isn't straightforward to solve because N decreases along the gradient and thus dropping low N sites means that the computed regression are from a narrower lower elevation portion of the gradient thus complicating interpretation.

Remaining Analyses

Here is our remaining todo list:

  • submit mobr PR for dev branch to integrate recent changes made to graphics and analysis
  • decide on best set of univariate metrics graphics (e.g., N by itself then the diversity metrics or some other combo)
  • decide if we're ok using OLS for univariate metrics - or do we need to change to GLM (e.g., Poisson regression for N and S particularly at the alpha scale). I think this hinges in part on how we are going to use these regressions. If they are just qualitative then OLS is fine but if folks want rigorous R2 and p-values then OLS is not appropriate for alpha S and N with mean so close to zero. I'm leaning towards more of a qualitative usage of the curves.
  • make any aesthetic corrections to the multi-scale figure (e.g., should we change the scatterplots to regression lines in the first row of the graphic?). This would be made on the mobr repo dev branch
  • it would be great if we could update mobr univariate code to be better for continuous variables right now we have to hack it together in our own analysis
  • integrate @T-Engel spatial sampling algos into mobr on dev branch (@T-Engel can you tackle this?)
    • reanalyze ant data to see if results change at all
  • decide if we need a formal sensitivity analysis or not this would be built with mobsim
    • a sub component of this would be to more formally investigate the issue of having large enough N (see #7, but I'm not sure we're 100% locked into this)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.