Make gnls model with tree measurements data

Hi Community

Im want make a model for understand the behaviour of trees (forest) data from Colombia. Im check information about this and suggest me make a Kozak model and run it. I get it with library(forestmangr).

But I need present a model like gnls of nlme package (or other model) but I dont have any idea how to understand this models and construct it. I have experiences with lm but not with gnls, im confussed.

Its important check the assumptions of the final models.

# Example data 
data <- structure(list(Individuo = c(1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 
2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 
6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 
10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 15, 15, 
15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17), h_m = c(0, 
1, 1.3, 2, 3, 4, 13, 0, 1, 1.3, 2, 3, 0, 0.42, 1.3, 1.42, 2.42, 
3.42, 1.3, 1.45, 2.45, 3.45, 4.45, 5.45, 1, 1.3, 2, 3, 4, 5, 
0, 1.3, 2.3, 3.3, 4.3, 5.3, 10.15, 0.57, 1.3, 1.57, 2.57, 3.57, 
1.9, 2.9, 3.9, 4.9, 1.3, 1.82, 2.82, 3.82, 2, 3, 4, 0.25, 1.25, 
1.3, 2.25, 3.25, 0, 0.3, 1.3, 2.3, 9.3, 10.3, 0, 0.77, 1.3, 2.16, 
3.16, 4.16, 5.16, 6.16, 3.08, 4.08, 5.08, 6.08, 7.08, 3.2, 4.2, 
5.2, 6.2), d_cm = c(40.2, 31.8, 32.2, 30, 29.9, 29, 24, 20.3, 
14.7, 14.5, 13.6, 12.6, 19.7, 17.4, 16.8, 16.5, 15.3, 14.6, 18.3, 
18.9, 16.3, 15.7, 15.6, 14.7, 21.7, 21.2, 19.9, 20, 19, 18, 28.6, 
26, 24.8, 24.1, 23.1, 22.4, 18.8, 32.9, 30.8, 30.2, 29.9, 29, 
14.2, 13.9, 13.1, 12.5, 25.7, 24.1, 26, 23.1, 14.5, 13.4, 13.1, 
11, 10, 10.1, 9.3, 8.7, 29.7, 26.8, 23.1, 22.8, 19.5, 19.3, 12.2, 
10.5, 19.6, 18.5, 18, 17.2, 16.8, 13.9, 21.2, 20.5, 20.3, 19, 
19.6, 21, 20.8, 19.9, 19.2), th_m = c(21.5, 21.5, 21.5, 21.5, 
21.5, 21.5, 21.5, 10.5, 10.5, 10.5, 10.5, 10.5, 14.1, 14.1, 14.1, 
14.1, 14.1, 14.1, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 16, 16, 
16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 20, 20, 20, 20, 20, 
13.7, 13.7, 13.7, 13.7, 19.1, 19.1, 19.1, 19.1, 13.6, 13.6, 13.6, 
14.3, 14.3, 14.3, 14.3, 14.3, 21, 21, 21, 21, 21, 21, 12.14, 
12.14, 20.5, 20.5, 20.5, 20.5, 20.5, 20.5, 12.96, 12.96, 12.96, 
12.96, 12.96, 22.2, 22.2, 22.2, 22.2), bdh_cm = c(1.3, 1.3, 1.3, 
1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 
1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 
1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 
1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 
1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 
1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3
)), row.names = c(NA, -81L), class = c("tbl_df", "tbl", "data.frame"
))
# Models
mod1 <- gnls(d_cm ~ h_m + th_m + bdh_cm, data= data) # dont run

#how and why use  SSasympOff ?

The variables are:

  • d_cm : diameter variable, in cm. (dependent variable)
  • dbh_cm : diameter at breast height variable, in cm.
  • h_m : height variable, in meters.
  • th_m: total height variable, in meters.

Tnks!