Spintproef tomaat

Author

Benedikte Van Heghe

Model spintpopulatie

library(readxl)
library(glmmTMB)
Warning: package 'glmmTMB' was built under R version 4.5.3
library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
DIR <- "C:/Users/bvanheghe/OneDrive - Harvestis/Documenten/Dataverwerkingen R/"
Rdata <- read_excel(paste0(DIR, "RuweData.xlsx"))
New names:
• `` -> `...19`
• `` -> `...20`
• `` -> `...21`
• `` -> `...22`
• `` -> `...23`
• `` -> `...24`
• `` -> `...25`
• `` -> `...26`
• `` -> `...27`
• `` -> `...28`
• `` -> `...29`
attach(Rdata)

Rdata$Object <- as.factor(Rdata$Object)
Rdata$Datum <- as.factor(Rdata$Datum)
Rdata$Herhaling <- as.factor(Rdata$Herhaling)
Rdata$Stengel <- as.factor(Rdata$Stengel)

Rdata <- Rdata %>%
  group_by(Object, Herhaling, Rij, Stengel) %>%
  mutate(Startspint = Spint[Datum == "2026-06-04"]) %>%
  ungroup()

mC <- glmmTMB(
  Spint ~ Object*Datum +
    Startspint +
    Uitvoerder +
    Rij +
    vak +
    (1|Herhaling:Object:Rij),
  family = nbinom2,
  data = Rdata)

#assumpties
library(DHARMa)
This is DHARMa 0.4.7. For overview type '?DHARMa'. For recent changes, type news(package = 'DHARMa')
simulationOutput <- simulateResiduals(mC)
plot(simulationOutput)

Model C corrigeert voor variatie in initiële spintdruk (startspint), andere tellers (uitvoerder) en horizontale (vak 1 tem 4) en verticale (rij) gradiënt in spintdruk in de afdeling. De spint haard bevond zich namelijk in één hoek van de afdeling en de populatie breidde zich van daar uit. Als random factor wordt Herhaling:Object:Rij meegenomen voor de variatie binnen een veldje aan één zijde van een rij. Nog verder opsplitsen tot op stengelniveau heeft geen zin en verklaart geen verder variatie.

library(emmeans)
Welcome to emmeans.
Caution: You lose important information if you filter this package's results.
See '? untidy'
emm_spint <- emmeans(
  mC,
  ~ Object | Datum,
  type = "response"
)

emm_spint
Datum = 2026-06-04:
 Object response    SE  df asymp.LCL asymp.UCL
 1          50.8  6.97 Inf      38.9      66.5
 2          58.8  9.25 Inf      43.2      80.1
 3          50.2  6.88 Inf      38.4      65.7
 4          26.9  4.14 Inf      19.9      36.3
 5          31.8  4.46 Inf      24.2      41.9

Datum = 2026-06-08:
 Object response    SE  df asymp.LCL asymp.UCL
 1          46.3  6.29 Inf      35.5      60.4
 2          43.1  6.58 Inf      31.9      58.1
 3          49.0  6.68 Inf      37.5      64.0
 4          32.4  4.84 Inf      24.1      43.4
 5          32.8  4.53 Inf      25.0      43.0

Datum = 2026-06-11:
 Object response    SE  df asymp.LCL asymp.UCL
 1          61.5  8.37 Inf      47.1      80.3
 2          55.6  8.62 Inf      41.0      75.3
 3          66.7  9.09 Inf      51.1      87.2
 4          40.6  6.08 Inf      30.3      54.4
 5          40.2  5.56 Inf      30.7      52.8

Datum = 2026-06-18:
 Object response    SE  df asymp.LCL asymp.UCL
 1          43.3  5.95 Inf      33.1      56.7
 2          26.4  3.99 Inf      19.6      35.5
 3          45.7  6.30 Inf      34.9      59.9
 4          51.0  7.51 Inf      38.2      68.0
 5          35.5  4.98 Inf      27.0      46.8

Datum = 2026-06-22:
 Object response    SE  df asymp.LCL asymp.UCL
 1          75.8 10.40 Inf      58.0      99.2
 2          26.8  4.09 Inf      19.9      36.1
 3          71.0  9.78 Inf      54.2      93.0
 4          51.1  7.48 Inf      38.4      68.1
 5          26.6  3.72 Inf      20.2      35.0

Results are averaged over the levels of: Uitvoerder 
Confidence level used: 0.95 
Intervals are back-transformed from the log scale 
pairs(emm_spint)
Datum = 2026-06-04:
 contrast          ratio     SE  df null z.ratio p.value
 Object1 / Object2 0.864 0.1800 Inf    1  -0.703  0.9559
 Object1 / Object3 1.012 0.1960 Inf    1   0.063  1.0000
 Object1 / Object4 1.892 0.3900 Inf    1   3.092  0.0170
 Object1 / Object5 1.597 0.3130 Inf    1   2.385  0.1193
 Object2 / Object3 1.172 0.2480 Inf    1   0.749  0.9447
 Object2 / Object4 2.190 0.5220 Inf    1   3.288  0.0089
 Object2 / Object5 1.848 0.3970 Inf    1   2.860  0.0344
 Object3 / Object4 1.869 0.3810 Inf    1   3.065  0.0185
 Object3 / Object5 1.577 0.3090 Inf    1   2.329  0.1358
 Object4 / Object5 0.844 0.1740 Inf    1  -0.823  0.9236

Datum = 2026-06-08:
 contrast          ratio     SE  df null z.ratio p.value
 Object1 / Object2 1.076 0.2210 Inf    1   0.356  0.9966
 Object1 / Object3 0.945 0.1820 Inf    1  -0.295  0.9984
 Object1 / Object4 1.431 0.2890 Inf    1   1.778  0.3865
 Object1 / Object5 1.413 0.2730 Inf    1   1.786  0.3817
 Object2 / Object3 0.878 0.1830 Inf    1  -0.624  0.9713
 Object2 / Object4 1.331 0.3070 Inf    1   1.238  0.7292
 Object2 / Object5 1.313 0.2760 Inf    1   1.298  0.6928
 Object3 / Object4 1.515 0.3040 Inf    1   2.070  0.2333
 Object3 / Object5 1.495 0.2890 Inf    1   2.079  0.2292
 Object4 / Object5 0.987 0.1990 Inf    1  -0.066  1.0000

Datum = 2026-06-11:
 contrast          ratio     SE  df null z.ratio p.value
 Object1 / Object2 1.107 0.2270 Inf    1   0.498  0.9876
 Object1 / Object3 0.922 0.1770 Inf    1  -0.423  0.9933
 Object1 / Object4 1.516 0.3090 Inf    1   2.043  0.2455
 Object1 / Object5 1.529 0.2960 Inf    1   2.194  0.1820
 Object2 / Object3 0.833 0.1730 Inf    1  -0.880  0.9044
 Object2 / Object4 1.369 0.3200 Inf    1   1.345  0.6627
 Object2 / Object5 1.381 0.2920 Inf    1   1.525  0.5459
 Object3 / Object4 1.644 0.3320 Inf    1   2.463  0.0992
 Object3 / Object5 1.658 0.3210 Inf    1   2.615  0.0676
 Object4 / Object5 1.008 0.2030 Inf    1   0.042  1.0000

Datum = 2026-06-18:
 contrast          ratio     SE  df null z.ratio p.value
 Object1 / Object2 1.642 0.3370 Inf    1   2.417  0.1108
 Object1 / Object3 0.948 0.1830 Inf    1  -0.274  0.9988
 Object1 / Object4 0.851 0.1700 Inf    1  -0.811  0.9274
 Object1 / Object5 1.220 0.2380 Inf    1   1.021  0.8456
 Object2 / Object3 0.578 0.1210 Inf    1  -2.630  0.0650
 Object2 / Object4 0.518 0.1170 Inf    1  -2.901  0.0306
 Object2 / Object5 0.743 0.1570 Inf    1  -1.407  0.6231
 Object3 / Object4 0.897 0.1770 Inf    1  -0.550  0.9820
 Object3 / Object5 1.286 0.2500 Inf    1   1.295  0.6942
 Object4 / Object5 1.434 0.2840 Inf    1   1.819  0.3627

Datum = 2026-06-22:
 contrast          ratio     SE  df null z.ratio p.value
 Object1 / Object2 2.831 0.5750 Inf    1   5.122  <.0001
 Object1 / Object3 1.069 0.2060 Inf    1   0.344  0.9970
 Object1 / Object4 1.484 0.2960 Inf    1   1.980  0.2757
 Object1 / Object5 2.853 0.5550 Inf    1   5.386  <.0001
 Object2 / Object3 0.378 0.0789 Inf    1  -4.661  <.0001
 Object2 / Object4 0.524 0.1180 Inf    1  -2.878  0.0326
 Object2 / Object5 1.008 0.2110 Inf    1   0.037  1.0000
 Object3 / Object4 1.389 0.2740 Inf    1   1.665  0.4557
 Object3 / Object5 2.670 0.5210 Inf    1   5.033  <.0001
 Object4 / Object5 1.922 0.3850 Inf    1   3.262  0.0098

Results are averaged over the levels of: Uitvoerder 
P value adjustment: tukey method for comparing a family of 5 estimates 
Tests are performed on the log scale 
emm <- emmeans(mC, ~ Object * Datum) 

contrast(
  emm,
  interaction = "pairwise"
)
 Object_pairwise Datum_pairwise              estimate    SE  df z.ratio p.value
 1 - 2           (2026-06-04) - (2026-06-08) -0.21906 0.218 Inf  -1.003  0.3159
 1 - 3           (2026-06-04) - (2026-06-08)  0.06896 0.215 Inf   0.320  0.7488
 1 - 4           (2026-06-04) - (2026-06-08)  0.27900 0.228 Inf   1.224  0.2210
 1 - 5           (2026-06-04) - (2026-06-08)  0.12250 0.219 Inf   0.560  0.5755
 2 - 3           (2026-06-04) - (2026-06-08)  0.28803 0.218 Inf   1.319  0.1873
 2 - 4           (2026-06-04) - (2026-06-08)  0.49807 0.241 Inf   2.069  0.0385
 2 - 5           (2026-06-04) - (2026-06-08)  0.34156 0.221 Inf   1.544  0.1226
 3 - 4           (2026-06-04) - (2026-06-08)  0.21004 0.228 Inf   0.923  0.3559
 3 - 5           (2026-06-04) - (2026-06-08)  0.05353 0.218 Inf   0.245  0.8064
 4 - 5           (2026-06-04) - (2026-06-08) -0.15651 0.231 Inf  -0.678  0.4976
 1 - 2           (2026-06-04) - (2026-06-11) -0.24798 0.212 Inf  -1.169  0.2424
 1 - 3           (2026-06-04) - (2026-06-11)  0.09334 0.214 Inf   0.436  0.6632
 1 - 4           (2026-06-04) - (2026-06-11)  0.22155 0.223 Inf   0.993  0.3205
 1 - 5           (2026-06-04) - (2026-06-11)  0.04333 0.219 Inf   0.198  0.8430
 2 - 3           (2026-06-04) - (2026-06-11)  0.34132 0.212 Inf   1.611  0.1071
 2 - 4           (2026-06-04) - (2026-06-11)  0.46953 0.220 Inf   2.132  0.0330
 2 - 5           (2026-06-04) - (2026-06-11)  0.29131 0.216 Inf   1.351  0.1767
 3 - 4           (2026-06-04) - (2026-06-11)  0.12821 0.223 Inf   0.576  0.5646
 3 - 5           (2026-06-04) - (2026-06-11) -0.05001 0.218 Inf  -0.229  0.8188
 4 - 5           (2026-06-04) - (2026-06-11) -0.17822 0.226 Inf  -0.787  0.4311
 1 - 2           (2026-06-04) - (2026-06-18) -0.64193 0.220 Inf  -2.912  0.0036
 1 - 3           (2026-06-04) - (2026-06-18)  0.06532 0.218 Inf   0.300  0.7644
 1 - 4           (2026-06-04) - (2026-06-18)  0.79936 0.226 Inf   3.544  0.0004
 1 - 5           (2026-06-04) - (2026-06-18)  0.26903 0.221 Inf   1.219  0.2228
 2 - 3           (2026-06-04) - (2026-06-18)  0.70725 0.221 Inf   3.196  0.0014
 2 - 4           (2026-06-04) - (2026-06-18)  1.44130 0.237 Inf   6.088  <.0001
 2 - 5           (2026-06-04) - (2026-06-18)  0.91096 0.225 Inf   4.054  0.0001
 3 - 4           (2026-06-04) - (2026-06-18)  0.73405 0.226 Inf   3.255  0.0011
 3 - 5           (2026-06-04) - (2026-06-18)  0.20371 0.221 Inf   0.922  0.3566
 4 - 5           (2026-06-04) - (2026-06-18) -0.53033 0.228 Inf  -2.329  0.0199
 1 - 2           (2026-06-04) - (2026-06-22) -1.18662 0.219 Inf  -5.423  <.0001
 1 - 3           (2026-06-04) - (2026-06-22) -0.05405 0.218 Inf  -0.248  0.8042
 1 - 4           (2026-06-04) - (2026-06-22)  0.24283 0.225 Inf   1.078  0.2809
 1 - 5           (2026-06-04) - (2026-06-22) -0.58045 0.220 Inf  -2.637  0.0084
 2 - 3           (2026-06-04) - (2026-06-22)  1.13257 0.221 Inf   5.127  <.0001
 2 - 4           (2026-06-04) - (2026-06-22)  1.42944 0.233 Inf   6.146  <.0001
 2 - 5           (2026-06-04) - (2026-06-22)  0.60617 0.223 Inf   2.713  0.0067
 3 - 4           (2026-06-04) - (2026-06-22)  0.29688 0.225 Inf   1.320  0.1867
 3 - 5           (2026-06-04) - (2026-06-22) -0.52640 0.221 Inf  -2.386  0.0170
 4 - 5           (2026-06-04) - (2026-06-22) -0.82328 0.226 Inf  -3.636  0.0003
 1 - 2           (2026-06-08) - (2026-06-11) -0.02892 0.215 Inf  -0.135  0.8929
 1 - 3           (2026-06-08) - (2026-06-11)  0.02438 0.213 Inf   0.114  0.9090
 1 - 4           (2026-06-08) - (2026-06-11) -0.05746 0.224 Inf  -0.256  0.7976
 1 - 5           (2026-06-08) - (2026-06-11) -0.07917 0.215 Inf  -0.368  0.7132
 2 - 3           (2026-06-08) - (2026-06-11)  0.05329 0.215 Inf   0.248  0.8043
 2 - 4           (2026-06-08) - (2026-06-11) -0.02854 0.235 Inf  -0.122  0.9032
 2 - 5           (2026-06-08) - (2026-06-11) -0.05025 0.219 Inf  -0.230  0.8185
 3 - 4           (2026-06-08) - (2026-06-11) -0.08183 0.224 Inf  -0.365  0.7153
 3 - 5           (2026-06-08) - (2026-06-11) -0.10354 0.216 Inf  -0.480  0.6313
 4 - 5           (2026-06-08) - (2026-06-11) -0.02171 0.224 Inf  -0.097  0.9229
 1 - 2           (2026-06-08) - (2026-06-18) -0.42287 0.214 Inf  -1.979  0.0478
 1 - 3           (2026-06-08) - (2026-06-18) -0.00364 0.216 Inf  -0.017  0.9865
 1 - 4           (2026-06-08) - (2026-06-18)  0.52036 0.218 Inf   2.385  0.0171
 1 - 5           (2026-06-08) - (2026-06-18)  0.14654 0.218 Inf   0.672  0.5017
 2 - 3           (2026-06-08) - (2026-06-18)  0.41922 0.214 Inf   1.960  0.0499
 2 - 4           (2026-06-08) - (2026-06-18)  0.94323 0.216 Inf   4.367  <.0001
 2 - 5           (2026-06-08) - (2026-06-18)  0.56940 0.216 Inf   2.636  0.0084
 3 - 4           (2026-06-08) - (2026-06-18)  0.52400 0.218 Inf   2.398  0.0165
 3 - 5           (2026-06-08) - (2026-06-18)  0.15018 0.218 Inf   0.688  0.4916
 4 - 5           (2026-06-08) - (2026-06-18) -0.37382 0.221 Inf  -1.694  0.0903
 1 - 2           (2026-06-08) - (2026-06-22) -0.96755 0.213 Inf  -4.536  <.0001
 1 - 3           (2026-06-08) - (2026-06-22) -0.12301 0.216 Inf  -0.570  0.5685
 1 - 4           (2026-06-08) - (2026-06-22) -0.03618 0.218 Inf  -0.166  0.8685
 1 - 5           (2026-06-08) - (2026-06-22) -0.70295 0.217 Inf  -3.238  0.0012
 2 - 3           (2026-06-08) - (2026-06-22)  0.84454 0.215 Inf   3.929  0.0001
 2 - 4           (2026-06-08) - (2026-06-22)  0.93138 0.219 Inf   4.256  <.0001
 2 - 5           (2026-06-08) - (2026-06-22)  0.26461 0.216 Inf   1.226  0.2203
 3 - 4           (2026-06-08) - (2026-06-22)  0.08684 0.221 Inf   0.393  0.6943
 3 - 5           (2026-06-08) - (2026-06-22) -0.57993 0.219 Inf  -2.650  0.0081
 4 - 5           (2026-06-08) - (2026-06-22) -0.66677 0.222 Inf  -2.999  0.0027
 1 - 2           (2026-06-11) - (2026-06-18) -0.39395 0.217 Inf  -1.815  0.0696
 1 - 3           (2026-06-11) - (2026-06-18) -0.02802 0.216 Inf  -0.130  0.8967
 1 - 4           (2026-06-11) - (2026-06-18)  0.57782 0.222 Inf   2.600  0.0093
 1 - 5           (2026-06-11) - (2026-06-18)  0.22570 0.218 Inf   1.035  0.3008
 2 - 3           (2026-06-11) - (2026-06-18)  0.36593 0.217 Inf   1.683  0.0923
 2 - 4           (2026-06-11) - (2026-06-18)  0.97177 0.231 Inf   4.213  <.0001
 2 - 5           (2026-06-11) - (2026-06-18)  0.61965 0.222 Inf   2.790  0.0053
 3 - 4           (2026-06-11) - (2026-06-18)  0.60584 0.222 Inf   2.726  0.0064
 3 - 5           (2026-06-11) - (2026-06-18)  0.25372 0.218 Inf   1.162  0.2451
 4 - 5           (2026-06-11) - (2026-06-18) -0.35211 0.222 Inf  -1.585  0.1131
 1 - 2           (2026-06-11) - (2026-06-22) -0.93864 0.215 Inf  -4.372  <.0001
 1 - 3           (2026-06-11) - (2026-06-22) -0.14739 0.215 Inf  -0.685  0.4933
 1 - 4           (2026-06-11) - (2026-06-22)  0.02128 0.222 Inf   0.096  0.9236
 1 - 5           (2026-06-11) - (2026-06-22) -0.62378 0.218 Inf  -2.861  0.0042
 2 - 3           (2026-06-11) - (2026-06-22)  0.79125 0.217 Inf   3.648  0.0003
 2 - 4           (2026-06-11) - (2026-06-22)  0.95991 0.227 Inf   4.228  <.0001
 2 - 5           (2026-06-11) - (2026-06-22)  0.31486 0.221 Inf   1.423  0.1547
 3 - 4           (2026-06-11) - (2026-06-22)  0.16867 0.222 Inf   0.759  0.4479
 3 - 5           (2026-06-11) - (2026-06-22) -0.47639 0.219 Inf  -2.175  0.0296
 4 - 5           (2026-06-11) - (2026-06-22) -0.64506 0.223 Inf  -2.898  0.0038
 1 - 2           (2026-06-18) - (2026-06-22) -0.54469 0.215 Inf  -2.539  0.0111
 1 - 3           (2026-06-18) - (2026-06-22) -0.11937 0.215 Inf  -0.555  0.5788
 1 - 4           (2026-06-18) - (2026-06-22) -0.55654 0.217 Inf  -2.562  0.0104
 1 - 5           (2026-06-18) - (2026-06-22) -0.84948 0.219 Inf  -3.883  0.0001
 2 - 3           (2026-06-18) - (2026-06-22)  0.42532 0.215 Inf   1.983  0.0474
 2 - 4           (2026-06-18) - (2026-06-22) -0.01185 0.217 Inf  -0.055  0.9565
 2 - 5           (2026-06-18) - (2026-06-22) -0.30480 0.218 Inf  -1.396  0.1628
 3 - 4           (2026-06-18) - (2026-06-22) -0.43717 0.218 Inf  -2.008  0.0446
 3 - 5           (2026-06-18) - (2026-06-22) -0.73011 0.219 Inf  -3.332  0.0009
 4 - 5           (2026-06-18) - (2026-06-22) -0.29294 0.221 Inf  -1.323  0.1858

Results are averaged over the levels of: Uitvoerder 
Results are given on the log (not the response) scale. 

Verschillen tussen behandelingen nagaan

library(emmeans)
library(multcomp)
Loading required package: mvtnorm
Loading required package: survival
Loading required package: TH.data
Loading required package: MASS

Attaching package: 'MASS'
The following object is masked from 'package:dplyr':

    select

Attaching package: 'TH.data'
The following object is masked from 'package:MASS':

    geyser
emm <- emmeans(mC, ~ Object * Datum)
deltas <- contrast(emm,interaction = c("pairwise","consec"))
deltas
 Object_pairwise Datum_consec                estimate    SE  df z.ratio p.value
 1 - 2           (2026-06-08) - (2026-06-04)   0.2191 0.218 Inf   1.003  0.3159
 1 - 3           (2026-06-08) - (2026-06-04)  -0.0690 0.215 Inf  -0.320  0.7488
 1 - 4           (2026-06-08) - (2026-06-04)  -0.2790 0.228 Inf  -1.224  0.2210
 1 - 5           (2026-06-08) - (2026-06-04)  -0.1225 0.219 Inf  -0.560  0.5755
 2 - 3           (2026-06-08) - (2026-06-04)  -0.2880 0.218 Inf  -1.319  0.1873
 2 - 4           (2026-06-08) - (2026-06-04)  -0.4981 0.241 Inf  -2.069  0.0385
 2 - 5           (2026-06-08) - (2026-06-04)  -0.3416 0.221 Inf  -1.544  0.1226
 3 - 4           (2026-06-08) - (2026-06-04)  -0.2100 0.228 Inf  -0.923  0.3559
 3 - 5           (2026-06-08) - (2026-06-04)  -0.0535 0.218 Inf  -0.245  0.8064
 4 - 5           (2026-06-08) - (2026-06-04)   0.1565 0.231 Inf   0.678  0.4976
 1 - 2           (2026-06-11) - (2026-06-08)   0.0289 0.215 Inf   0.135  0.8929
 1 - 3           (2026-06-11) - (2026-06-08)  -0.0244 0.213 Inf  -0.114  0.9090
 1 - 4           (2026-06-11) - (2026-06-08)   0.0575 0.224 Inf   0.256  0.7976
 1 - 5           (2026-06-11) - (2026-06-08)   0.0792 0.215 Inf   0.368  0.7132
 2 - 3           (2026-06-11) - (2026-06-08)  -0.0533 0.215 Inf  -0.248  0.8043
 2 - 4           (2026-06-11) - (2026-06-08)   0.0285 0.235 Inf   0.122  0.9032
 2 - 5           (2026-06-11) - (2026-06-08)   0.0503 0.219 Inf   0.230  0.8185
 3 - 4           (2026-06-11) - (2026-06-08)   0.0818 0.224 Inf   0.365  0.7153
 3 - 5           (2026-06-11) - (2026-06-08)   0.1035 0.216 Inf   0.480  0.6313
 4 - 5           (2026-06-11) - (2026-06-08)   0.0217 0.224 Inf   0.097  0.9229
 1 - 2           (2026-06-18) - (2026-06-11)   0.3939 0.217 Inf   1.815  0.0696
 1 - 3           (2026-06-18) - (2026-06-11)   0.0280 0.216 Inf   0.130  0.8967
 1 - 4           (2026-06-18) - (2026-06-11)  -0.5778 0.222 Inf  -2.600  0.0093
 1 - 5           (2026-06-18) - (2026-06-11)  -0.2257 0.218 Inf  -1.035  0.3008
 2 - 3           (2026-06-18) - (2026-06-11)  -0.3659 0.217 Inf  -1.683  0.0923
 2 - 4           (2026-06-18) - (2026-06-11)  -0.9718 0.231 Inf  -4.213  <.0001
 2 - 5           (2026-06-18) - (2026-06-11)  -0.6197 0.222 Inf  -2.790  0.0053
 3 - 4           (2026-06-18) - (2026-06-11)  -0.6058 0.222 Inf  -2.726  0.0064
 3 - 5           (2026-06-18) - (2026-06-11)  -0.2537 0.218 Inf  -1.162  0.2451
 4 - 5           (2026-06-18) - (2026-06-11)   0.3521 0.222 Inf   1.585  0.1131
 1 - 2           (2026-06-22) - (2026-06-18)   0.5447 0.215 Inf   2.539  0.0111
 1 - 3           (2026-06-22) - (2026-06-18)   0.1194 0.215 Inf   0.555  0.5788
 1 - 4           (2026-06-22) - (2026-06-18)   0.5565 0.217 Inf   2.562  0.0104
 1 - 5           (2026-06-22) - (2026-06-18)   0.8495 0.219 Inf   3.883  0.0001
 2 - 3           (2026-06-22) - (2026-06-18)  -0.4253 0.215 Inf  -1.983  0.0474
 2 - 4           (2026-06-22) - (2026-06-18)   0.0119 0.217 Inf   0.055  0.9565
 2 - 5           (2026-06-22) - (2026-06-18)   0.3048 0.218 Inf   1.396  0.1628
 3 - 4           (2026-06-22) - (2026-06-18)   0.4372 0.218 Inf   2.008  0.0446
 3 - 5           (2026-06-22) - (2026-06-18)   0.7301 0.219 Inf   3.332  0.0009
 4 - 5           (2026-06-22) - (2026-06-18)   0.2929 0.221 Inf   1.323  0.1858

Results are averaged over the levels of: Uitvoerder 
Results are given on the log (not the response) scale. 
delta <- contrast(
  emmeans(mC, ~ Datum | Object),
  "consec",
  by = "Object"
)

delta_df <- as.data.frame(delta)
delta_df
Object = 1:
 contrast                      estimate        SE  df z.ratio p.value
 (2026-06-08) - (2026-06-04) -0.0933611 0.1529028 Inf  -0.611  0.9352
 (2026-06-11) - (2026-06-08)  0.2841596 0.1507345 Inf   1.885  0.1961
 (2026-06-18) - (2026-06-11) -0.3502575 0.1525233 Inf  -2.296  0.0769
 (2026-06-22) - (2026-06-18)  0.5594509 0.1546782 Inf   3.617  0.0011

Object = 2:
 contrast                      estimate        SE  df z.ratio p.value
 (2026-06-08) - (2026-06-04) -0.3124256 0.1541025 Inf  -2.027  0.1437
 (2026-06-11) - (2026-06-08)  0.2552432 0.1554653 Inf   1.642  0.3075
 (2026-06-18) - (2026-06-11) -0.7442073 0.1541984 Inf  -4.826  <.0001
 (2026-06-22) - (2026-06-18)  0.0147648 0.1520854 Inf   0.097  0.9999

Object = 3:
 contrast                      estimate        SE  df z.ratio p.value
 (2026-06-08) - (2026-06-04) -0.0243983 0.1525415 Inf  -0.160  0.9996
 (2026-06-11) - (2026-06-08)  0.3085359 0.1512286 Inf   2.040  0.1410
 (2026-06-18) - (2026-06-11) -0.3782776 0.1527359 Inf  -2.477  0.0481
 (2026-06-22) - (2026-06-18)  0.4400808 0.1541160 Inf   2.856  0.0161

Object = 4:
 contrast                      estimate        SE  df z.ratio p.value
 (2026-06-08) - (2026-06-04)  0.1856437 0.1717162 Inf   1.081  0.6706
 (2026-06-11) - (2026-06-08)  0.2267040 0.1636592 Inf   1.385  0.4609
 (2026-06-18) - (2026-06-11)  0.2275583 0.1619337 Inf   1.405  0.4474
 (2026-06-22) - (2026-06-18)  0.0029135 0.1590288 Inf   0.018  1.0000

Object = 5:
 contrast                      estimate        SE  df z.ratio p.value
 (2026-06-08) - (2026-06-04)  0.0291354 0.1568436 Inf   0.186  0.9992
 (2026-06-11) - (2026-06-08)  0.2049919 0.1538367 Inf   1.333  0.5018
 (2026-06-18) - (2026-06-11) -0.1245526 0.1562292 Inf  -0.797  0.8530
 (2026-06-22) - (2026-06-18) -0.2900313 0.1592971 Inf  -1.821  0.2226

Results are averaged over the levels of: Uitvoerder 
Results are given on the log (not the response) scale. 
P value adjustment: mvt method for 4 tests 
delta_df$perc_change <-
(exp(delta_df$estimate) - 1) * 100

library(tidyr)
tabelA <- delta_df %>%
  dplyr::select(Object, contrast, perc_change) %>%
  tidyr::pivot_wider(
    names_from = contrast,
    values_from = perc_change
)

library(dplyr)
library(tidyr)
library(knitr)
library(kableExtra)
Warning: package 'kableExtra' was built under R version 4.5.3

Attaching package: 'kableExtra'
The following object is masked from 'package:dplyr':

    group_rows
tabelB <- delta_df %>%
  mutate(
    perc_change = sprintf(
      "%+.1f%%",
      (exp(estimate) - 1) * 100
      )
    ) %>%
  dplyr::select(
    Object,
    contrast,
    perc_change
    ) %>%
  pivot_wider(
    names_from = contrast,
    values_from = perc_change
    )
kable(
  tabelA,
  caption = "Geschatte verandering van de spintpopulatie tussen opeenvolgende beoordelingsmomenten"
) %>%
kable_styling(full_width = FALSE)
Geschatte verandering van de spintpopulatie tussen opeenvolgende beoordelingsmomenten
Object (2026-06-08) - (2026-06-04) (2026-06-11) - (2026-06-08) (2026-06-18) - (2026-06-11) (2026-06-22) - (2026-06-18)
1 -8.913549 32.86449 -29.54933 74.9711553
2 -26.832997 29.07755 -52.48892 1.4874365
3 -2.410311 36.14304 -31.49597 55.2832614
4 20.399319 25.44585 25.55306 0.2917796
5 2.956396 22.75152 -11.71082 -25.1759879
tabelB
# A tibble: 5 × 5
  Object (2026-06-08) - (2026-06…¹ (2026-06-11) - (2026…² (2026-06-18) - (2026…³
  <fct>  <chr>                     <chr>                  <chr>                 
1 1      -8.9%                     +32.9%                 -29.5%                
2 2      -26.8%                    +29.1%                 -52.5%                
3 3      -2.4%                     +36.1%                 -31.5%                
4 4      +20.4%                    +25.4%                 +25.6%                
5 5      +3.0%                     +22.8%                 -11.7%                
# ℹ abbreviated names: ¹​`(2026-06-08) - (2026-06-04)`,
#   ²​`(2026-06-11) - (2026-06-08)`, ³​`(2026-06-18) - (2026-06-11)`
# ℹ 1 more variable: `(2026-06-22) - (2026-06-18)` <chr>
Periode Significante verschillen
4-8 juni 2-4
8-11 juni geen
11-18 juni 1-4, 2-4, 2-5, 3-4
18-22 juni 1-2, 1-4, 1-5, 2-3, 3-4, 3-5

Visualisatie

library(ggplot2)
emm_df <- as.data.frame(emm_spint)

ggplot(emm_df, aes(x = Datum, y = response,
                   group = Object, color = Object)) +
  geom_line(linewidth = 1) +
  geom_point(size = 3) +
  geom_errorbar(
    aes(ymin = asymp.LCL, ymax = asymp.UCL),
    width = 0.1
  ) +
  labs(
    x = "Datum",
    y = "Geschat aantal spint",
    color = "Object"
  ) +
  theme_classic() +
  theme(
    text = element_text(size = 12),
    legend.position = "right"
  )

drop1(mC, test = "Chisq")
Single term deletions

Model:
Spint ~ Object * Datum + Startspint + Uitvoerder + Rij + vak + 
    (1 | Herhaling:Object:Rij)
             Df    AIC    LRT  Pr(>Chi)    
<none>          7451.7                     
Startspint    1 7475.7 25.933 3.535e-07 ***
Uitvoerder    1 7483.7 33.990 5.541e-09 ***
Rij           1 7513.7 63.974 1.261e-15 ***
vak           1 7453.9  4.205   0.04031 *  
Object:Datum 16 7501.7 82.006 7.223e-11 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Invloed van Macrolophus en Phytoseilus

m_Macro <- glmmTMB(
  Spint ~ Object*Datum +
    Startspint +
    Uitvoerder +
    Rij +
    vak +
    Macrolophus +
    (1|Herhaling:Object:Rij),
  family = nbinom2,
  data = Rdata)

m_Phyto <- glmmTMB(
  Spint ~ Object*Datum +
    Startspint +
    Uitvoerder +
    Rij +
    vak +
    Phytoseilus +
    (1|Herhaling:Object:Rij),
  family = nbinom2,
  data = Rdata)

m_beide <- glmmTMB(
  Spint ~ Object*Datum +
    Startspint +
    Uitvoerder +
    Rij +
    vak +
    Macrolophus +
    Phytoseilus +
    (1|Herhaling:Object:Rij),
  family = nbinom2,
  data = Rdata)

anova(m_Macro, mC)
Data: Rdata
Models:
mC: Spint ~ Object * Datum + Startspint + Uitvoerder + Rij + vak + , zi=~0, disp=~1
mC:     (1 | Herhaling:Object:Rij), zi=~0, disp=~1
m_Macro: Spint ~ Object * Datum + Startspint + Uitvoerder + Rij + vak + , zi=~0, disp=~1
m_Macro:     Macrolophus + (1 | Herhaling:Object:Rij), zi=~0, disp=~1
        Df    AIC    BIC  logLik deviance  Chisq Chi Df Pr(>Chisq)  
mC      31 7451.7 7597.0 -3694.9   7389.7                           
m_Macro 32 7448.6 7598.5 -3692.3   7384.6 5.1435      1    0.02333 *
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(m_Phyto, mC)
Data: Rdata
Models:
mC: Spint ~ Object * Datum + Startspint + Uitvoerder + Rij + vak + , zi=~0, disp=~1
mC:     (1 | Herhaling:Object:Rij), zi=~0, disp=~1
m_Phyto: Spint ~ Object * Datum + Startspint + Uitvoerder + Rij + vak + , zi=~0, disp=~1
m_Phyto:     Phytoseilus + (1 | Herhaling:Object:Rij), zi=~0, disp=~1
        Df    AIC    BIC  logLik deviance Chisq Chi Df Pr(>Chisq)
mC      31 7451.7 7597.0 -3694.9   7389.7                        
m_Phyto 32 7453.7 7603.6 -3694.9   7389.7     0      1     0.9946
anova(m_Macro, m_beide)
Data: Rdata
Models:
m_Macro: Spint ~ Object * Datum + Startspint + Uitvoerder + Rij + vak + , zi=~0, disp=~1
m_Macro:     Macrolophus + (1 | Herhaling:Object:Rij), zi=~0, disp=~1
m_beide: Spint ~ Object * Datum + Startspint + Uitvoerder + Rij + vak + , zi=~0, disp=~1
m_beide:     Macrolophus + Phytoseilus + (1 | Herhaling:Object:Rij), zi=~0, disp=~1
        Df    AIC    BIC  logLik deviance Chisq Chi Df Pr(>Chisq)
m_Macro 32 7448.6 7598.5 -3692.3   7384.6                        
m_beide 33 7450.6 7605.2 -3692.3   7384.6 2e-04      1     0.9884

Model met enkel Macrolophus heeft laagste AIC. Volgende vraag: hoe verhoudt Macrolophus zich tot spint? Hoe verhoudt Phytoseilus zich tot spint?

library(dplyr)
library(ggplot2)

ggplot(Rdata,
aes(Phytoseilus, Spint,
colour = Object)) +
geom_point(alpha = 0.5) +
geom_smooth(se = TRUE)
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.45
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 1.45
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 0
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 1
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
-0.45
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
1.45
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
number 0
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : There are other near
singularities as well. 1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.075
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 2.075
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 1.7634e-16
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 4
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
-0.075
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
2.075
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
number 1.7634e-16
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : There are other near
singularities as well. 4
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: at -0.055
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: radius 0.003025
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: all data on boundary of neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.055
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 0.055
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: zero-width neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 1
Warning: Failed to fit group 3.
Caused by error in `predLoess()`:
! NA/NaN/Inf in foreign function call (arg 5)
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.04
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 1.04
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 0
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 1
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
-0.04
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
1.04
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
number 0
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : There are other near
singularities as well. 1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 1.1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 0
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 1
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
-0.1
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius 1.1
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
number 0
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : There are other near
singularities as well. 1

ggplot(Rdata,
aes(Macrolophus, Spint,
colour = Object)) +
geom_point(alpha = 0.5) +
geom_smooth(se = TRUE)
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: at -0.03
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: radius 0.0009
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: all data on boundary of neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.03
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 0.03
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: zero-width neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 1
Warning: Failed to fit group 1.
Caused by error in `predLoess()`:
! NA/NaN/Inf in foreign function call (arg 5)
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: at -0.02
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: radius 0.0004
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: all data on boundary of neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.02
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 0.02
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: zero-width neighborhood. make span bigger
Warning: Failed to fit group 2.
Caused by error in `predLoess()`:
! NA/NaN/Inf in foreign function call (arg 5)
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: at -0.01
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: radius 0.0001
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: all data on boundary of neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.01
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 0.01
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 4.0401
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: zero-width neighborhood. make span bigger
Warning: Failed to fit group 3.
Caused by error in `predLoess()`:
! NA/NaN/Inf in foreign function call (arg 5)
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: at -0.03
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: radius 0.0009
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: all data on boundary of neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.03
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 0.03
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: zero-width neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 1
Warning: Failed to fit group 4.
Caused by error in `predLoess()`:
! NA/NaN/Inf in foreign function call (arg 5)
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: at -0.02
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: radius 0.0004
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: all data on boundary of neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -0.02
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: neighborhood radius 0.02
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 1
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: zero-width neighborhood. make span bigger
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 1
Warning: Failed to fit group 5.
Caused by error in `predLoess()`:
! NA/NaN/Inf in foreign function call (arg 5)

Hoe meer macro, hoe minder spint. Al is het waarschijnlijk beter om het aantal Macro van de vorige telling te gebruiken => toont beter aan hoe sterk de Macro aanwezig was om de spint op te eten. Opvallend dat er zoveel meer Phytoseilus geteld is in het onbehandelde object. De Phyto was duidelijk sterk in haarden uitgezet, lagen de haarden toevallig in de onbehandelde objecten? Of had de phytoseilus net veel last van de behandelingen?

Phytoseilus model

Rdata <- Rdata %>%
  group_by(Object, Herhaling, Rij, Stengel) %>%
  mutate(Startphyto = Phytoseilus[Datum == "2026-06-04"]) %>%
  ungroup()

mC_Phyto <- glmmTMB(
  Phytoseilus ~ Object*Datum +
    Startphyto +
    Uitvoerder +
    Rij +
    vak +
    (1|Herhaling:Object:Rij),
  family = nbinom2,
  data = Rdata)

summary(mC_Phyto)
 Family: nbinom2  ( log )
Formula:          
Phytoseilus ~ Object * Datum + Startphyto + Uitvoerder + Rij +  
    vak + (1 | Herhaling:Object:Rij)
Data: Rdata

      AIC       BIC    logLik -2*log(L)  df.resid 
   1897.5    2042.8    -917.8    1835.5       769 

Random effects:

Conditional model:
 Groups               Name        Variance Std.Dev.
 Herhaling:Object:Rij (Intercept) 0.1482   0.3849  
Number of obs: 800, groups:  Herhaling:Object:Rij, 40

Dispersion parameter for nbinom2 family ():  0.7 

Conditional model:
                        Estimate Std. Error z value Pr(>|z|)    
(Intercept)             -0.09952    0.64335  -0.155  0.87707    
Object2                 -0.14750    0.64500  -0.229  0.81912    
Object3                 -0.31982    0.73500  -0.435  0.66346    
Object4                  0.85761    0.78534   1.092  0.27482    
Object5                 -2.05700    1.18807  -1.731  0.08339 .  
Datum2026-06-08          0.96506    0.58969   1.637  0.10172    
Datum2026-06-11          1.17788    0.56985   2.067  0.03873 *  
Datum2026-06-18          3.43812    0.52773   6.515 7.27e-11 ***
Datum2026-06-22          3.01546    0.56115   5.374 7.71e-08 ***
Startphyto               0.31745    0.10293   3.084  0.00204 ** 
UitvoerderSimon         -0.88922    0.20191  -4.404 1.06e-05 ***
Rij                     -0.29632    0.04752  -6.236 4.49e-10 ***
vak                      0.27161    0.08611   3.154  0.00161 ** 
Object2:Datum2026-06-08 -0.54373    0.78988  -0.688  0.49122    
Object3:Datum2026-06-08  0.16555    0.86497   0.191  0.84822    
Object4:Datum2026-06-08 -3.19248    1.32196  -2.415  0.01574 *  
Object5:Datum2026-06-08  1.29161    1.30538   0.989  0.32244    
Object2:Datum2026-06-11  0.44696    0.69639   0.642  0.52099    
Object3:Datum2026-06-11  0.14852    0.82982   0.179  0.85796    
Object4:Datum2026-06-11 -0.86521    0.91179  -0.949  0.34266    
Object5:Datum2026-06-11  1.64913    1.26738   1.301  0.19319    
Object2:Datum2026-06-18 -1.62971    0.69632  -2.340  0.01926 *  
Object3:Datum2026-06-18 -1.79938    0.80502  -2.235  0.02540 *  
Object4:Datum2026-06-18 -1.89826    0.82630  -2.297  0.02160 *  
Object5:Datum2026-06-18  1.29251    1.21789   1.061  0.28857    
Object2:Datum2026-06-22 -0.77785    0.72213  -1.077  0.28140    
Object3:Datum2026-06-22 -1.15344    0.83699  -1.378  0.16818    
Object4:Datum2026-06-22 -0.97782    0.84543  -1.157  0.24744    
Object5:Datum2026-06-22  2.03848    1.23213   1.654  0.09804 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
library(emmeans)
emm_Phyto <- emmeans(
  mC_Phyto,
  ~ Object | Datum,
  type = "response"
)

library(ggplot2)
emmP_df <- as.data.frame(emm_Phyto)

ggplot(emmP_df, aes(x = Datum, y = response,
                   group = Object, color = Object)) +
  geom_line(linewidth = 1) +
  geom_point(size = 3) +
  geom_errorbar(
    aes(ymin = asymp.LCL, ymax = asymp.UCL),
    width = 0.1
  ) +
  labs(
    x = "Datum",
    y = "Geschat aantal Phyto",
    color = "Object"
  ) +
  theme_classic() +
  theme(
    text = element_text(size = 12),
    legend.position = "right"
  )

drop1(mC_Phyto, test = "Chisq")
Single term deletions

Model:
Phytoseilus ~ Object * Datum + Startphyto + Uitvoerder + Rij + 
    vak + (1 | Herhaling:Object:Rij)
             Df    AIC    LRT  Pr(>Chi)    
<none>          1897.5                     
Startphyto    1 1905.7 10.141 0.0014497 ** 
Uitvoerder    1 1915.3 19.731 8.914e-06 ***
Rij           1 1927.1 31.550 1.944e-08 ***
vak           1 1904.4  8.875 0.0028913 ** 
Object:Datum 16 1911.3 45.819 0.0001038 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Macrolophus model

mC_Macro <- glmmTMB(
  Macrolophus ~ Object*Datum +
    (1|Herhaling:Object:Rij),
  family = nbinom2,
  data = Rdata)

summary(mC_Macro)
 Family: nbinom2  ( log )
Formula:          Macrolophus ~ Object * Datum + (1 | Herhaling:Object:Rij)
Data: Rdata

      AIC       BIC    logLik -2*log(L)  df.resid 
    871.2     997.7    -408.6     817.2       773 

Random effects:

Conditional model:
 Groups               Name        Variance Std.Dev.
 Herhaling:Object:Rij (Intercept) 0.4333   0.6583  
Number of obs: 800, groups:  Herhaling:Object:Rij, 40

Dispersion parameter for nbinom2 family (): 2.02 

Conditional model:
                          Estimate Std. Error z value Pr(>|z|)    
(Intercept)             -3.053e+00  7.702e-01  -3.963 7.39e-05 ***
Object2                 -6.465e-01  1.293e+00  -0.500  0.61699    
Object3                  5.478e-02  1.083e+00   0.051  0.95965    
Object4                  1.119e+00  9.298e-01   1.203  0.22890    
Object5                 -5.539e-01  1.290e+00  -0.429  0.66772    
Datum2026-06-08         -7.093e-01  1.244e+00  -0.570  0.56850    
Datum2026-06-11         -2.392e-02  1.023e+00  -0.023  0.98135    
Datum2026-06-18          2.421e+00  7.658e-01   3.162  0.00157 ** 
Datum2026-06-22          3.139e+00  7.532e-01   4.168 3.08e-05 ***
Object2:Datum2026-06-08 -1.636e+01  5.068e+03  -0.003  0.99742    
Object3:Datum2026-06-08  1.110e+00  1.558e+00   0.712  0.47626    
Object4:Datum2026-06-08  4.790e-01  1.426e+00   0.336  0.73694    
Object5:Datum2026-06-08  2.899e+00  1.642e+00   1.765  0.07751 .  
Object2:Datum2026-06-11  1.127e+00  1.558e+00   0.723  0.46940    
Object3:Datum2026-06-11 -2.446e+01  1.467e+05   0.000  0.99987    
Object4:Datum2026-06-11 -8.938e-01  1.335e+00  -0.669  0.50332    
Object5:Datum2026-06-11  1.397e+00  1.528e+00   0.914  0.36071    
Object2:Datum2026-06-18 -8.304e-01  1.353e+00  -0.614  0.53946    
Object3:Datum2026-06-18 -3.072e+01  9.848e+05   0.000  0.99998    
Object4:Datum2026-06-18 -2.243e+00  9.947e-01  -2.254  0.02417 *  
Object5:Datum2026-06-18 -2.246e-01  1.318e+00  -0.170  0.86464    
Object2:Datum2026-06-22 -4.088e-01  1.294e+00  -0.316  0.75206    
Object3:Datum2026-06-22 -2.458e+00  1.167e+00  -2.106  0.03521 *  
Object4:Datum2026-06-22 -6.687e-01  9.063e-01  -0.738  0.46062    
Object5:Datum2026-06-22  3.648e-01  1.280e+00   0.285  0.77556    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
library(emmeans)
emm_Macro <- emmeans(
  mC_Macro,
  ~ Object | Datum,
  type = "response"
)

library(ggplot2)
emmM_df <- as.data.frame(emm_Macro)

ggplot(emmM_df, aes(x = Datum, y = response,
                   group = Object, color = Object)) +
  geom_line(linewidth = 1) +
  geom_point(size = 3) +
  geom_errorbar(
    aes(ymin = asymp.LCL, ymax = asymp.UCL),
    width = 0.1
  ) +
  labs(
    x = "Datum",
    y = "Geschat aantal Macro",
    color = "Object"
  ) +
  theme_classic() +
  theme(
    text = element_text(size = 12),
    legend.position = "right"
  )

drop1(mC_Macro, test = "Chisq")
Single term deletions

Model:
Macrolophus ~ Object * Datum + (1 | Herhaling:Object:Rij)
             Df    AIC    LRT  Pr(>Chi)    
<none>          871.24                     
Object:Datum 16 879.72 40.482 0.0006618 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1