hunter-stanke / rFIA

rFIA
https://rfia.netlify.com/
47 stars 23 forks source link

growMort bySizeClass missing removed stems #40

Open crhenry opened 1 year ago

crhenry commented 1 year ago

When running growMort by size class at the plot level, I find that it is missing removed stems as compared to growMort at the plot level, not by size class. Comparing the previous and current statevars for the results run with size class included, it also appears that the only time the statevar changes is when there is a recruitment or mortality event - otherwise, previous and current are exactly the same. Comparing plots one to one with and without the bySizeClass parameter, the values do not match up. The code I have been running is as follows:

growMort(db, byPlot = TRUE, stateVar = 'BAA') versus growMort(db, byPlot = TRUE, bySizeClass = TRUE, stateVar = 'BAA')

I'm not sure if this is a known limitation or not, but it currently appears that aggregating by size class is providing erroneous results.