umr-amap / BIOMASS

https://umr-amap.github.io/BIOMASS/
24 stars 17 forks source link

OK to build a model with one dataset, then use it with another dataset? #17

Closed maurolepore closed 4 years ago

maurolepore commented 5 years ago

In ?BIOMASS::AGBmonteCarlo, notice that HDmodel is created with data from NouraguesHD, but then applied to data from KarnatakaForest. I see that NouraguesHD has height data while KarnatakaForest doesn't. Yet it's not obvious (for someone like me with little experience in the topic) is how this is appropriate. Maybe a comment would clarify?

data(NouraguesHD)
data(KarnatakaForest)

# Modelling height-diameter relationship
HDmodel <- modelHD(D = NouraguesHD$D, H = NouraguesHD$H, method = "log2")

# Retrieving wood density values
KarnatakaWD <- getWoodDensity(KarnatakaForest$genus, KarnatakaForest$species,
  stand = KarnatakaForest$plotId
)

# Propagating errors with a standard error in wood density in one plot
filt <- KarnatakaForest$plotId == "BSP20"
resultMC <- AGBmonteCarlo(
  n = 50,
  D = KarnatakaForest$D[filt], WD = KarnatakaWD$meanWD[filt],
  errWD = KarnatakaWD$sdWD[filt], HDmodel = HDmodel
)
MaximeRM commented 4 years ago

Dear mauro,

sorry for the late response (I did not see that issue before...). The use of the NouraguesHD dataset to estimate Karnataka AGB was only for illustration purpose but do not make ecological sense. The point is that I did not have both a free HD and tree datasets for the same location...

If I can get one I can modify this help in the package as I agree that it would be less confusing...

Thank for this comment!