My experiment was conducted in multiple years. Each year, plants were sown in an infested field and then harvested after a certain time. There was a weather station to record weather data. I would like to use mixed models to investigate the effect of weather variables on disease development. The problem is the duration of experiment varied each year. Plants exposed to different weather conditions for varying period likely affected disease severity. Is there a way to account for different trial durations in GLMMs? Would it help if I include total number of days in each year as an offset term offset(log(total_days))
? If I use an offset, would that mean that infection was proportional to the total number of days in each, and thus solve the problem?My response variable is disease severity per plot. There were 10 plants per plot. Disease severity for each plot was recorded by adding the percentage of leaf area infected. I have divided the percentage by 100 to get proportions for fitting bet regression. My response variable is positive with value ranges between 0 , 1 (both exclusive). There a total of 11 years as shown in the table below, but there are a total of 37 data points, so the data is not very large.
I am thinking to fit something like this.
mod <- glmmTMB (disease_severity ~ mean_rh + mean_temp + mean_wind_speed + total_rain + (1|year) + offset(log(total_days)), family = beta_family(), data = dat)