I am trying to model tree diameter distributions from a series of sites using a mixed-effects model. This model assumes that data follow an underlying Weibull distribution. This is all being done using R package merlin
.
Function merlin
is throwing error Error in model[[k]][[2]][[2]] : object of type 'symbol' is not subsettable
.
Below is a minimum reproducible example using dummy data.
# load tidyverse for tibble functionality
library(tidyverse)
# generate dummy data
dummy_data <- tibble(
dbh = c(4.0, 3.0, 3.0, 4.0, 1.5, 1.5, 1.5, 3.2, 2.5, 2.0, 2.5, 2.5, 2.0, 2.5, 0.5, 1.0, 2.5, 1.5, 2.5, 2.2),
site = c(rep("a", 10), rep("b", 10))
)
# Fit the Weibull model using merlin
merlin(dbh ~ site,
family = "weibull",
data = dummy_data)
Running this code causes function merlin
to throw error shown above. How do I address this?
3