SCBI-ForestGEO / McGregor_climate-sensitivity-variation

repository for linking the climate sensitity of tree growth (derived from cores) to functional traits
0 stars 0 forks source link

manuscript clean-up #62

Closed teixeirak closed 4 years ago

teixeirak commented 4 years ago

@mcgregorian1, our checklist in issue #48 was getting intractable/ out of date. Here's a new list:

Throughout

Figures & Tables

General:

FIg. 1-

Fig. height-

Table 1-

Table 2-

Table 3-

Table 4- individual predictor tests

Table 5- best full models

manuscript

General-

Abstract-

supplementary info

table S3-

table S4 -

table S5-

Figure S3-

mcgregorian1 commented 4 years ago

Table 4- individual predictor tests

  • [x] @mcgregorian1 , why is dAIC the same for DBH and H? Is this correct?

I can confirm that the dAIC for DBH and H is coming directly from the code, and after testing for dAIC all years individually (running each line of code), I can also confirm that the results are like what we're seeing. My only guess is that because DBH and height are linked intrinsically, we're getting the same result? But I agree it's odd we're seeing the exact same numbers for everything, including likelihood and the other stats that AIC yields.

To test it (in case Valentine wants to take a look at it):

trees_all_sub <- read.csv("manuscript/tables_figures/trees_all_sub.csv", stringsAsFactors = FALSE)

#one line is height, the other is DBH
models <- c("resist.value ~ year+(1|sp/tree)", "resist.value ~ year+(1|sp/tree)+height.ln.m")
# models <- c("resist.value ~ year+(1|sp/tree)", "resist.value ~ year+(1|sp/tree)+dbh.ln.cm")

lmm_all <- lapply(models, function(x){
  fit1 <- lmer(x, data = model_df[[j]], REML=FALSE, 
               control = lmerControl(optimizer ="Nelder_Mead"))
  return(fit1)
})
names(lmm_all) <- models
var_aic <- aictab(lmm_all, second.ord=TRUE, sort=FALSE) #rank based on AICc

#the individual year models are all subsets of the full, so it would make sense that if we're seeing the identical results for the full, we'd see it for the individual
  • [x] @mcgregorian1 , did we use Y in the null models after it came out non-significant? (I think either way is justifiable, but make sure table is correct)

I'm not sure what Y is referring to here?

teixeirak commented 4 years ago

Y refers to year.

mcgregorian1 commented 4 years ago

Ah right. Yes we did keep Y in for the null models when doing all years together because we figured that was the point for testing across years

teixeirak commented 4 years ago

Regarding height and DBH AICs, it wasn’t this way in previous iterations. While H is derived from DBH, they’re not so closely linked in that the allometey is different for every species. Perhaps confirm nothing went wrong in that step in a more recent iteration? Could one equation have been used for all species?

mcgregorian1 commented 4 years ago

I'm a little confused by it because I double-checked the data and the H:DBH ratio is not consistent throughout, which is what I'd expect. I'll look at the equations that made DBH and height

mcgregorian1 commented 4 years ago

Ok, the dAIC change happened on 19 Oct with my "new results" commit. I think that was where I had realized the height equations weren't correct so I changed them to be what they should. I'm going to check those equations now.

mcgregorian1 commented 4 years ago

@teixeirak I realized some of the heights from NEON weren't being included in the regression analyses. But even after changing that and fixing the regression equations, I'm still getting the same dAIC, albeit a slightly different coefficient than before. At this point I'm not sure of the reason.

I'm in the process of changing the full analysis script so it runs and reads better (and is easier for someone else to follow). I should have that finished tonight.

teixeirak commented 4 years ago

I'm a little confused by it because I double-checked the data and the H:DBH ratio is not consistent throughout, which is what I'd expect. I'll look at the equations that made DBH and height

We would not expect it to be constant, just given the nature of the height allometry equations. So don't worry about that.

teixeirak commented 4 years ago

@teixeirak I realized some of the heights from NEON weren't being included in the regression analyses. But even after changing that and fixing the regression equations, I'm still getting the same dAIC, albeit a slightly different coefficient than before. At this point I'm not sure of the reason.

I'm in the process of changing the full analysis script so it runs and reads better (and is easier for someone else to follow). I should have that finished tonight.

Does this change the full model results?

mcgregorian1 commented 4 years ago

I can confirm the full model results do not change because the candidate traits themselves do not change.

teixeirak commented 4 years ago

Right, but if some of the predicted heights are different, that changes model coefficients and perhaps variables included, right?

mcgregorian1 commented 4 years ago

Yes I'm going through the rest of the code now

mcgregorian1 commented 4 years ago

The updated coefficients are now on github (they didn't change that much, mostly by a few hundredths). I'm finishing clarifying the code and will upload soon

teixeirak commented 4 years ago

The updated coefficients are now on github (they didn't change that much, mostly by a few hundredths). I'm finishing clarifying the code and will upload soon

Okay. So there were no changes to the other coefficients, etc?

Could you please update tables 4 and 5?

mcgregorian1 commented 4 years ago

My bad for not being specific. I've now updated tables 4 and 5. The coefficients that changed in table4 were only the ones for height and twi*height, whereas for table 5 the only changes were slight coefficient and Intercept changes for the models that had height as a variable.

teixeirak commented 4 years ago

@mcgregorian1, I believe I've done all "my part" for now, and that everything left for you is referenced with check boxes above. A lot of it is fairly minor clean-up, with probably the most substantive change being changes to Fig. 2.

Once the substantive changes above are done, we can send to coauthors for final review and get ready to submit!

mcgregorian1 commented 4 years ago

Ok sounds good. I might be able to get to figure 2 in the next couple days otherwise it should be good by this weekend.

mcgregorian1 commented 4 years ago

@teixeirak Figure 2 has now been fully updated. I will get to the other parts of this issue soon, but I think it is good to send to coauthors again unless you think something else needs to be done beforehand.

teixeirak commented 4 years ago

Looks great; thanks! I'm going to take a pass now and try to send to coauthors today.

mcgregorian1 commented 4 years ago

Table 3-

  • [ ] formatting

For formatting, I put in the appropriate variable symbolization but there's something going on with the commands to make it bold and differently-aligned, I think, that's currently causing it to not render like we want.

teixeirak commented 4 years ago

For formatting, I put in the appropriate variable symbolization but there's something going on with the commands to make it bold and differently-aligned, I think, that's currently causing it to not render like we want.

this is fixed.

teixeirak commented 4 years ago

remaining items moved to #82.