How to account for temporal autocorrelation in beta regression fitted with betareg R package?

169 Views Asked by At

I have time series data where I calculated disease severity in plants at different intervals. My response variable is between 0 & 1 (both exclusive), so beta regression seem to be the most appropriate model. My predictors are weather variables - the aim is to determine the effect of weather variables on disease severity. Here is a reproducible example.

df <- structure(
  list(
    year = structure(
      c(1L, 2L, 3L, 5L, 4L, 6L, 7L,
        8L, 9L, 10L),
      .Label = c(
        "2007",
        "2012",
        "2013",
        "2014",
        "2014.1",
        "2015.1",
        "2015.2",
        "2016",
        "2017",
        "2020"
      ),
      class = "factor"
    ),
    mean_rh = c(
      83.9025107032967,
      86.3309364921875,
      78.7225209283154,
      82.3598611111111,
      77.8125490392157,
      77.5694460507813,
      77.340364207483,
      78.601888359589,
      77.9234626042403,
      79.1268228283582
    ),
    mean_temp = c(
      8.06137667087912,
      3.75335204210526,
      8.39571386344086,
      7.57235900444444,
      10.5797098501961,
      8.52468121914062,
      9.63416591190476,
      12.2749429150685,
      9.65211886219081,
      10.1620900981343
    ),
    mean_ws = c(
      1.84656288406593,
      2.0747284924812,
      1.92455694623656,
      2.12702791944444,
      1.91802733215686,
      1.77915314179687,
      1.71631475340136,
      1.78024162876712,
      1.45554503710247,
      1.60409589440299
    ),
    total_rain = c(
      469.5,
      367.1,
      509.3,
      358.7,
      562.3,
      547.6,
      756.4,
      789.5,
      640.5,
      665.1
    ),
    severity = c(
      0.81667,
      0.01325,
      0.06125,
      0.81667,
      0.0198,
      0.0623,
      0.0035,
      0.00475,
      0.885,
      0.0348
    )
  ),
  class = c("grouped_df", "tbl_df", "tbl", "data.frame"),
  row.names = c(NA,-10L),
  groups = structure(
    list(
      year = structure(
        1:10,
        .Label = c(
          "2007",
          "2012",
          "2013",
          "2014",
          "2014.1",
          "2015.1",
          "2015.2",
          "2016",
          "2017",
          "2020"
        ),
        class = "factor"
      ),
      .rows = structure(
        list(1L,
             2L, 3L, 5L, 4L, 6L, 7L, 8L, 9L, 10L),
        ptype = integer(0),
        class = c("vctrs_list_of",
                  "vctrs_vctr", "list")
      )
    ),
    row.names = c(NA,-10L),
    class = c("tbl_df",
              "tbl", "data.frame"),
    .drop = TRUE
  )
)

My model is below

mod05 <-
  betareg(severity_ps ~ mean_temp +  mean_ws + total_rain + mean_rh,
          data = dat_preplanting)
summary(mod05)

However, when I checked the model residual autocorrelation using the acf() function, the plot is showing very high temporal autocorrelation.

enter image description here

However, when I check partial autocorrelation using pacf(mod05$residuals) function, no autocorrelation is detected.

My questions are,

  1. Is there autocorrelation problem if acf plot is showing autocorrelation but pacf plot is not?

  2. How to do I account for temporal autocorrelation in betareg R package? I checked the documentation but didn't find anything.

I tried to fit the model using glmmTMB & gam, including year as a random effect but the model failed to converge, suggesting that I have very limited degree of freedom. So I really need to find a way to account for temporal autocorrelation in betareg package. Thanks for any assistance.

0

There are 0 best solutions below