I want to fit a model to predict the ring density from cambial age. I have data from the nested design; two sites, four thinning treatments in each site with 5 replications (4*5 plots), and 4 tree classes in each plot. So, I want to fit a nonlinear mixed effect model with cambial age as a fixed effect with nested designs (site, treatments, tree class) as a random effect. I know how to fit the LMM but am not able to write the correct code in R for the NLMM with three random factors. Any leads will be highly appreciated.
tibble [26,508 × 20] (S3: tbl_df/tbl/data.frame) $ Plot_id : logi [1:26508] NA NA NA NA NA NA ... $ Treatments: chr [1:26508] "100" "100" "100" "100" ... $ Tree_class: chr [1:26508] "Codominant" "Codominant" "Codominant" "Codominant" ... $ Tree_id : chr [1:26508] "CDHU9" "CDHU9" "CDHU9" "CDHU9" ... $ Disc_id : chr [1:26508] "0" "0" "0" "0" ... $ Path_id: num [1:26508] 1 1 1 1 1 1 1 1 1 1 ... $ Ring_no: num [1:26508] 1 2 3 4 5 6 7 8 9 10 ... $ year: num [1:26508] 1992 1993 1994 1995 1996 ... $ Dmean: num [1:26508] 0.542 0.525 0.528 0.463 0.46 ... $ ringAge : num [1:26508] 1 2 3 4 5 6 7 8 9 10 ...