## Loading required package: readxl
## Loading required package: lubridate
## 
## Attaching package: 'lubridate'
## The following objects are masked from 'package:data.table':
## 
##     hour, isoweek, mday, minute, month, quarter, second, wday, week,
##     yday, year
## The following objects are masked from 'package:base':
## 
##     date, intersect, setdiff, union
## Loading required package: solartime
## - Winter data excluded.
## - The counts of all passing / wintering species (not resident nor breeding in the sampled unit) were set to zero. Abreed_and_non_breed contains the non-breeders as well.

Arid South

Factors are proximity to agriculture and time.

5 sites with 6 plots per site (3 for each proximity).

Total 5 campaigns, one of which is pilot in the year 2012. Two of the sites - Samar and Yahel, were sampled only in 2012 and then replaced with Zofar and Lotan.

Raw data Total abundance: 4987 Number of observations: 1512 Total richness: 83

Filtered data Total abundance: 2230 Number of observations: 931 Total richness: 35

Model gma, abundance and richness

Richness done with rare species. Abundance and mean abundance done without rare species. Full models include cosine and sine of the time difference from June 21st (in radians).

richness

Explore data.

## [1] "RICHNESS WITH RARE SPECIES"
## ℹ SHA-1 hash of file is "eef55df1963ba201f57cf44513f566298756fd4f"
richness year_ct site agriculture td_sc cos_td_rad sin_td_rad h_from_sunrise cos_hsun sin_hsun monitors_name wind precipitation temperature clouds
Min. : 1.000 Min. :0 Ein Yahav:30 Far :75 Min. :-1.8356 Min. :-0.09882 Min. :-0.9951 Length:150 Min. :0.4281 Min. :-0.2765 Eyal Shochat : 30 0 : 0 0 : 0 0 : 0 0 : 0
1st Qu.: 4.000 1st Qu.:2 Lotan :24 Near:75 1st Qu.:-0.5002 1st Qu.: 0.48251 1st Qu.:-0.8759 Class :difftime 1st Qu.:0.7840 1st Qu.: 0.1195 Adi Domer : 0 1 : 0 3 : 0 1 : 0 1 : 0
Median : 5.000 Median :4 Paran :30 NA Median : 0.3440 Median : 0.77352 Median :-0.6338 Mode :numeric Median :0.9272 Median : 0.3741 Asaf Mayrose : 0 2 : 0 NA’s:150 2 : 0 2 : 0
Mean : 5.287 Mean :4 Samar : 6 NA Mean : 0.1079 Mean : 0.66846 Mean :-0.6728 NA Mean :0.8678 Mean : 0.3628 Eliraz Dvir : 0 3 : 0 NA 3 : 0 3 : 0
3rd Qu.: 7.000 3rd Qu.:6 Yahel : 6 NA 3rd Qu.: 0.6063 3rd Qu.: 0.84294 3rd Qu.:-0.5380 NA 3rd Qu.:0.9852 3rd Qu.: 0.6206 Eliraz Dvir and Yoav Barak: 0 NA’s:150 NA NA’s:150 NA’s:150
Max. :11.000 Max. :8 Yotvata :30 NA Max. : 0.9115 Max. : 0.90882 Max. :-0.4172 NA Max. :1.0000 Max. : 0.9037 (Other) : 0 NA NA NA NA
NA NA Zofar :24 NA NA NA NA NA NA’s :60 NA’s :60 NA’s :120 NA NA NA NA

no observation for all 4 weather variables. many NAs for sampling time of day variables.exclude from model.

## Warning in cor(P.anal[, lapply(X = .SD, FUN = as.numeric), .SDcols =
## IVs[1:11]], : the standard deviation is zero
richness year_ct site agriculture td_sc cos_td_rad sin_td_rad h_from_sunrise cos_hsun sin_hsun monitors_name
richness 1.0000000 0.1981351 0.2076365 0.3746224 0.0905232 0.1112419 0.0469072 -0.1430392 0.1623966 -0.1397273 NA
year_ct 0.1981351 1.0000000 0.0000000 0.0000000 -0.5275969 -0.4733929 -0.6101868 -0.5003522 0.4259879 -0.5054987 NA
site 0.2076365 0.0000000 1.0000000 0.0000000 0.0205100 0.0106601 0.0292917 -0.1193344 0.1023013 -0.1261981 NA
agriculture 0.3746224 0.0000000 0.0000000 1.0000000 0.0109388 0.0094189 0.0134730 -0.0963764 0.0663892 -0.1022251 NA
td_sc 0.0905232 -0.5275969 0.0205100 0.0109388 1.0000000 0.9922533 0.9665746 -0.1444082 0.1044386 -0.1539195 NA
cos_td_rad 0.1112419 -0.4733929 0.0106601 0.0094189 0.9922533 1.0000000 0.9281118 -0.1357885 0.0953119 -0.1458357 NA
sin_td_rad 0.0469072 -0.6101868 0.0292917 0.0134730 0.9665746 0.9281118 1.0000000 -0.1486667 0.1157519 -0.1554410 NA
h_from_sunrise -0.1430392 -0.5003522 -0.1193344 -0.0963764 -0.1444082 -0.1357885 -0.1486667 1.0000000 -0.9217774 0.9961864 NA
cos_hsun 0.1623966 0.4259879 0.1023013 0.0663892 0.1044386 0.0953119 0.1157519 -0.9217774 1.0000000 -0.8861854 NA
sin_hsun -0.1397273 -0.5054987 -0.1261981 -0.1022251 -0.1539195 -0.1458357 -0.1554410 0.9961864 -0.8861854 1.0000000 NA
monitors_name NA NA NA NA NA NA NA NA NA NA NA

Fit Poisson glm, check for existence of overdispersion

## [1] "Estimating overdispersion parameter phi: (Res. Dev.)/(n-p) where n=number of observations; p=number of parameters in the model."
## [1] "od = 0.716371311042246"

Overdispersion parameter is < 1. Poisson more appropriate. Compare Poisson and negative binomial.

## Warning in theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace =
## control$trace > : iteration limit reached

## Warning in theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace =
## control$trace > : iteration limit reached
##       df      AIC
## m0.po 12 627.7586
## m0.nb 13 629.7610
## [1] "poisson"

## [1] "neg bin"

negative binomial did not converge due to underdispersion.

mixed model converged.

## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: poisson  ( log )
## Formula: richness ~ agriculture * year_ct + cos_td_rad + sin_td_rad +  
##     (1 | site)
##    Data: P.anal
## 
##      AIC      BIC   logLik deviance df.resid 
##    630.2    651.3   -308.1    616.2      143 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.5254 -0.5179 -0.1258  0.5250  2.5241 
## 
## Random effects:
##  Groups Name        Variance Std.Dev.
##  site   (Intercept) 0.01057  0.1028  
## Number of obs: 150, groups:  site, 7
## 
## Fixed effects:
##                         Estimate Std. Error z value Pr(>|z|)    
## (Intercept)              0.62794    0.71027   0.884  0.37665    
## agricultureNear          0.54938    0.13072   4.203 2.64e-05 ***
## year_ct                  0.07214    0.02263   3.188  0.00143 ** 
## cos_td_rad               0.56636    0.47854   1.184  0.23661    
## sin_td_rad              -0.23758    0.62840  -0.378  0.70537    
## agricultureNear:year_ct -0.05581    0.02535  -2.202  0.02767 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) agrclN yer_ct cs_td_ sn_td_
## agricultrNr -0.105                            
## year_ct      0.207  0.565                     
## cos_td_rad  -0.972 -0.010 -0.241              
## sin_td_rad   0.964  0.007  0.391 -0.923       
## agrcltrNr:_  0.073 -0.834 -0.657  0.020 -0.021

perform backward stepwise model selection of poisson glmer.

## Single term deletions
## 
## Model:
## richness ~ agriculture * year_ct + cos_td_rad + sin_td_rad + 
##     (1 | site)
##                     npar    AIC
## <none>                   630.23
## cos_td_rad             1 629.68
## sin_td_rad             1 628.37
## agriculture:year_ct    1 633.08

drop sine.

## Single term deletions
## 
## Model:
## richness ~ agriculture + year_ct + cos_td_rad + (1 | site) + 
##     agriculture:year_ct
##                     npar    AIC
## <none>                   628.37
## cos_td_rad             1 631.32
## agriculture:year_ct    1 631.26

final model includes year*agriculture, sampling time of year. Final model:

## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: poisson  ( log )
## Formula: richness ~ agriculture + year_ct + cos_td_rad + (1 | site) +  
##     agriculture:year_ct
##    Data: P.anal
## 
##      AIC      BIC   logLik deviance df.resid 
##    628.4    646.4   -308.2    616.4      144 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.5858 -0.5103 -0.1203  0.5165  2.5490 
## 
## Random effects:
##  Groups Name        Variance Std.Dev.
##  site   (Intercept) 0.01041  0.102   
## Number of obs: 150, groups:  site, 7
## 
## Fixed effects:
##                         Estimate Std. Error z value Pr(>|z|)    
## (Intercept)              0.88615    0.18745   4.727 2.28e-06 ***
## agricultureNear          0.54971    0.13075   4.204 2.62e-05 ***
## year_ct                  0.07552    0.02082   3.628 0.000286 ***
## cos_td_rad               0.40007    0.18281   2.188 0.028634 *  
## agricultureNear:year_ct -0.05601    0.02535  -2.209 0.027142 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) agrclN yer_ct cs_td_
## agricultrNr -0.422                     
## year_ct     -0.698  0.612              
## cos_td_rad  -0.808 -0.010  0.338       
## agrcltrNr:_  0.352 -0.834 -0.706  0.003
## $site
##           (Intercept)
## Ein Yahav -0.01340484
## Lotan     -0.05564092
## Paran     -0.02016408
## Samar     -0.05572249
## Yahel     -0.04520706
## Yotvata    0.16033758
## Zofar      0.03776431
## 
## with conditional variances for "site"
## $site

## Registered S3 methods overwritten by 'broom':
##   method            from  
##   tidy.glht         jtools
##   tidy.summary.glht jtools
Observations 150
Dependent variable richness
Type Mixed effects generalized linear model
Family poisson
Link log
AIC 628.369
BIC 646.433
Pseudo-R² (fixed effects) 0.203
Pseudo-R² (total) 0.247
Fixed Effects
exp(Est.) S.E. z val. p
(Intercept) 2.426 0.187 4.727 0.000
agricultureNear 1.733 0.131 4.204 0.000
year_ct 1.078 0.021 3.628 0.000
cos_td_rad 1.492 0.183 2.188 0.029
agricultureNear:year_ct 0.946 0.025 -2.209 0.027
Random Effects
Group Parameter Std. Dev.
site (Intercept) 0.102
Grouping Variables
Group # groups ICC
site 7 0.010
## Confidence intervals for merMod models is an experimental feature. The
## intervals reflect only the variance of the fixed effects, not the random
## effects.

statistically significant higher richness near agriculture.

Near plots have on average 1.6503966 more species than far plots, which is 38.4943533 percent higher.

Significant stronger relative increase in richness far from settlements:

On average, a near plot has 1.4713678 more individuals than a far plot, which is 25.9750404 percent higher.

The average rate of increase in richness far from settlements is FOUR FOLD the rate near settlements, 7.8447059 vs. 1.9701697, respectively.

geometric mean of abundance

Explore data. Exclude time of day because of high number of NAs.

## [1] "GEOMETRIC MEAN ABUNDANCE WITHOUT RARE SPECIES"
gma year_ct site agriculture td_sc cos_td_rad sin_td_rad
Min. :0.000 Min. :0 Ein Yahav:30 Far :75 Min. :-1.8356 Min. :-0.09882 Min. :-0.9951
1st Qu.:1.587 1st Qu.:2 Lotan :24 Near:75 1st Qu.:-0.5002 1st Qu.: 0.48251 1st Qu.:-0.8759
Median :2.030 Median :4 Paran :30 NA Median : 0.3440 Median : 0.77352 Median :-0.6338
Mean :2.192 Mean :4 Samar : 6 NA Mean : 0.1079 Mean : 0.66846 Mean :-0.6728
3rd Qu.:2.693 3rd Qu.:6 Yahel : 6 NA 3rd Qu.: 0.6063 3rd Qu.: 0.84294 3rd Qu.:-0.5380
Max. :6.192 Max. :8 Yotvata :30 NA Max. : 0.9115 Max. : 0.90882 Max. :-0.4172
NA NA Zofar :24 NA NA NA NA

Exclude one plot with zero GMA (Yahel Far 2 2012) Fit glm, compare gamma, gaussian (poisson inappropriate because response is not discrete)

Gamma seems better than gaussian. Fit fixed and mixed models.

Mixed model converged.

## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: Gamma  ( inverse )
## Formula: gma ~ agriculture * year_ct + cos_td_rad + sin_td_rad + (1 |  
##     site)
##    Data: P.anal
## 
##      AIC      BIC   logLik deviance df.resid 
##    316.6    340.7   -150.3    300.6      141 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.5304 -0.7568 -0.1935  0.4664  3.3741 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev.
##  site     (Intercept) 0.0004862 0.02205 
##  Residual             0.1063066 0.32605 
## Number of obs: 149, groups:  site, 7
## 
## Fixed effects:
##                          Estimate Std. Error t value Pr(>|z|)    
## (Intercept)              0.055019   0.201160   0.274  0.78446    
## agricultureNear         -0.161841   0.040129  -4.033 5.51e-05 ***
## year_ct                 -0.012149   0.007618  -1.595  0.11076    
## cos_td_rad               0.266141   0.132337   2.011  0.04432 *  
## sin_td_rad              -0.490219   0.185589  -2.641  0.00826 ** 
## agricultureNear:year_ct  0.014329   0.008355   1.715  0.08634 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) agrclN yer_ct cs_td_ sn_td_
## agricultrNr -0.134                            
## year_ct      0.202  0.573                     
## cos_td_rad  -0.967 -0.002 -0.248              
## sin_td_rad   0.958 -0.004  0.399 -0.912       
## agrcltrNr:_  0.084 -0.810 -0.683  0.023 -0.023

perform stepwise model selection of Gamma glmer.

## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00372887 (tol = 0.002, component 1)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00257598 (tol = 0.002, component 1)
## Single term deletions
## 
## Model:
## gma ~ agriculture * year_ct + cos_td_rad + sin_td_rad + (1 | 
##     site)
##                     npar    AIC
## <none>                   316.63
## cos_td_rad             1 318.38
## sin_td_rad             1 321.30
## agriculture:year_ct    1 317.54

drop agriculture:year.

## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00474736 (tol = 0.002, component 1)
## Single term deletions
## 
## Model:
## gma ~ agriculture + year_ct + cos_td_rad + sin_td_rad + (1 | 
##     site)
##             npar    AIC
## <none>           317.54
## agriculture    1 335.04
## year_ct        1 315.86
## cos_td_rad     1 319.13
## sin_td_rad     1 321.95

drop cosine.

## Single term deletions
## 
## Model:
## gma ~ agriculture + year_ct + sin_td_rad + (1 | site)
##             npar    AIC
## <none>           319.13
## agriculture    1 336.42
## year_ct        1 317.13
## sin_td_rad     1 321.03

drop year.

## Single term deletions
## 
## Model:
## gma ~ agriculture + sin_td_rad + (1 | site)
##             npar    AIC
## <none>           317.13
## agriculture    1 334.42
## sin_td_rad     1 321.15

agriculture and sampling time of year remain. This is the final model:

## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: Gamma  ( inverse )
## Formula: gma ~ agriculture + sin_td_rad + (1 | site)
##    Data: P.anal
## 
##      AIC      BIC   logLik deviance df.resid 
##    317.1    332.1   -153.6    307.1      144 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.5577 -0.7437 -0.2526  0.5694  3.7195 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev.
##  site     (Intercept) 0.0004287 0.0207  
##  Residual             0.1146477 0.3386  
## Number of obs: 149, groups:  site, 7
## 
## Fixed effects:
##                 Estimate Std. Error t value Pr(>|z|)    
## (Intercept)      0.40903    0.04607   8.878  < 2e-16 ***
## agricultureNear -0.10768    0.02400  -4.486 7.24e-06 ***
## sin_td_rad      -0.15651    0.06280  -2.492   0.0127 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) agrclN
## agricultrNr -0.355       
## sin_td_rad   0.874 -0.034
## $site
##            (Intercept)
## Ein Yahav  0.016757753
## Lotan      0.002440786
## Paran      0.006333531
## Samar     -0.007165124
## Yahel     -0.001758585
## Yotvata   -0.011616275
## Zofar     -0.004503318
## 
## with conditional variances for "site"
## $site

Observations 149
Dependent variable gma
Type Mixed effects generalized linear model
Family Gamma
Link inverse
AIC 317.13
BIC 332.15
Pseudo-R² (fixed effects) NA
Pseudo-R² (total) NA
Fixed Effects
Est. S.E. t val. p
(Intercept) 0.41 0.05 8.88 0.00
agricultureNear -0.11 0.02 -4.49 0.00
sin_td_rad -0.16 0.06 -2.49 0.01
Random Effects
Group Parameter Std. Dev.
site (Intercept) 0.02
Residual 0.34
Grouping Variables
Group # groups ICC
site 7 0.00
## Confidence intervals for merMod models is an experimental feature. The
## intervals reflect only the variance of the fixed effects, not the random
## effects.

Temporal trend in GMA is not significant.

Significant effect on GMA for agriculture proximity: higher near agriculture.

abundance

Explore data

## [1] "ABUNDANCE WITHOUT RARE SPECIES"
abundance year_ct site agriculture td_sc cos_td_rad sin_td_rad
Min. : 0.00 Min. :0 Ein Yahav:30 Far :75 Min. :-1.8356 Min. :-0.09882 Min. :-0.9951
1st Qu.: 7.00 1st Qu.:2 Lotan :24 Near:75 1st Qu.:-0.5002 1st Qu.: 0.48251 1st Qu.:-0.8759
Median :11.00 Median :4 Paran :30 NA Median : 0.3440 Median : 0.77352 Median :-0.6338
Mean :14.48 Mean :4 Samar : 6 NA Mean : 0.1079 Mean : 0.66846 Mean :-0.6728
3rd Qu.:19.00 3rd Qu.:6 Yahel : 6 NA 3rd Qu.: 0.6063 3rd Qu.: 0.84294 3rd Qu.:-0.5380
Max. :47.00 Max. :8 Yotvata :30 NA Max. : 0.9115 Max. : 0.90882 Max. :-0.4172
NA NA Zofar :24 NA NA NA NA

PHI>1, hence choose negative binomial. Fit fixed and mixed models. Choose mixed model if possible, otherwise choose a model with fixed-effects only.

Mixed model converged.

## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: Negative Binomial(5.1103)  ( log )
## Formula: abundance ~ agriculture * year_ct + cos_td_rad + sin_td_rad +  
##     (1 | site)
##    Data: P.anal
## 
##      AIC      BIC   logLik deviance df.resid 
##   1009.6   1033.7   -496.8    993.6      142 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7064 -0.6575 -0.2270  0.3776  5.7327 
## 
## Random effects:
##  Groups Name        Variance Std.Dev.
##  site   (Intercept) 0.02412  0.1553  
## Number of obs: 150, groups:  site, 7
## 
## Fixed effects:
##                         Estimate Std. Error z value Pr(>|z|)    
## (Intercept)              1.66512    0.80703   2.063 0.039088 *  
## agricultureNear          1.01253    0.15194   6.664 2.67e-11 ***
## year_ct                  0.08997    0.02695   3.339 0.000841 ***
## cos_td_rad               0.46461    0.53763   0.864 0.387483    
## sin_td_rad               0.16461    0.72690   0.226 0.820846    
## agricultureNear:year_ct -0.08391    0.03058  -2.744 0.006070 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) agrclN yer_ct cs_td_ sn_td_
## agricultrNr -0.096                            
## year_ct      0.215  0.537                     
## cos_td_rad  -0.971 -0.008 -0.240              
## sin_td_rad   0.962  0.017  0.400 -0.918       
## agrcltrNr:_  0.074 -0.825 -0.638  0.012 -0.020

model selection of glmer.

## Single term deletions
## 
## Model:
## abundance ~ agriculture * year_ct + cos_td_rad + sin_td_rad + 
##     (1 | site)
##                     npar    AIC
## <none>                   1009.6
## cos_td_rad             1 1008.4
## sin_td_rad             1 1007.7
## agriculture:year_ct    1 1015.2

drop sine.

## Single term deletions
## 
## Model:
## abundance ~ agriculture + year_ct + cos_td_rad + (1 | site) + 
##     agriculture:year_ct
##                     npar    AIC
## <none>                   1007.7
## cos_td_rad             1 1012.9
## agriculture:year_ct    1 1013.2

final model includes agriculture*year, sampling time of year. The final model:

## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: Negative Binomial(5.1103)  ( log )
## Formula: abundance ~ agriculture + year_ct + cos_td_rad + (1 | site) +  
##     agriculture:year_ct
##    Data: P.anal
## 
##      AIC      BIC   logLik deviance df.resid 
##   1007.7   1028.8   -496.8    993.7      143 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7052 -0.6628 -0.2260  0.3689  5.7030 
## 
## Random effects:
##  Groups Name        Variance Std.Dev.
##  site   (Intercept) 0.02404  0.155   
## Number of obs: 150, groups:  site, 7
## 
## Fixed effects:
##                         Estimate Std. Error z value Pr(>|z|)    
## (Intercept)              1.48943    0.22138   6.728 1.72e-11 ***
## agricultureNear          1.01197    0.15194   6.660 2.73e-11 ***
## year_ct                  0.08753    0.02469   3.544 0.000394 ***
## cos_td_rad               0.57638    0.21244   2.713 0.006663 ** 
## agricultureNear:year_ct -0.08378    0.03058  -2.740 0.006148 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) agrclN yer_ct cs_td_
## agricultrNr -0.410                     
## year_ct     -0.677  0.578              
## cos_td_rad  -0.809  0.018  0.351       
## agrcltrNr:_  0.338 -0.825 -0.687 -0.017
## $site
##           (Intercept)
## Ein Yahav -0.03298973
## Lotan     -0.13119134
## Paran     -0.05481234
## Samar     -0.02620322
## Yahel     -0.10433389
## Yotvata    0.22799096
## Zofar      0.12657362
## 
## with conditional variances for "site"
## $site

Interpretation of abundance model:

Observations 150
Dependent variable abundance
Type Mixed effects generalized linear model
Family Negative Binomial(5.1103)
Link log
AIC 1007.687
BIC 1028.761
Pseudo-R² (fixed effects) 0.617
Pseudo-R² (total) 0.716
Fixed Effects
exp(Est.) S.E. z val. p
(Intercept) 4.435 0.221 6.728 0.000
agricultureNear 2.751 0.152 6.660 0.000
year_ct 1.091 0.025 3.544 0.000
cos_td_rad 1.780 0.212 2.713 0.007
agricultureNear:year_ct 0.920 0.031 -2.740 0.006
Random Effects
Group Parameter Std. Dev.
site (Intercept) 0.155
Grouping Variables
Group # groups ICC
site 7 0.054
## Confidence intervals for merMod models is an experimental feature. The
## intervals reflect only the variance of the fixed effects, not the random
## effects.

significantly higher abundance near agriculture compared to far from it.

Near plots have on average 8.9527241 more individuals than far plots, which is 96.7667539 percent higher.

significant increase in abundance far from agriculture (9.1471415%), no change near agriculture.

On average, a near plot has 8.3819296 more individuals than a far plot, which is 46.2977639 percent higher.

community analysis using package MVabund

Explore single species observations, including mean-variance plot. There is a strong mean-var relationship, indicating that employing GLMs is the proper way to analyze, rather than OLS (assumption of homogeneity is violated).

## Overlapping points were shifted along the y-axis to make them visible.
## 
##  PIPING TO 2nd MVFACTOR
## Only the variables Streptopelia.decaocto, Passer.domesticus, Pycnonotus.xanthopygos, Iduna.pallida, Spilopelia.senegalensis, Oenanthe.melanura, Cercotrichas.galactotes, Galerida.cristata, Prinia.gracilis, Streptopelia.turtur, Ammomanes.deserti, Argya.squamiceps were included in the plot 
## (the variables with highest total abundance).

## [1] "abundance observations, aggregated into plots and species (i.e., several observations from the same species in the same plot are aggregated):"

## [1] "these are the actual observations, before aggregation into plots:"

## [1] "zoom in on high abundance observations:"

start model specification:

##       nb       po 
## 255.0285 300.8678
## [1] "POISSON"

## [1] "NEGATIVE BINOMIAL"

negative binomial model is better than poisson according to residuals and AIC comparison.

##       nb       po      nb1 
## 255.0285 300.8678 249.8495

The addition of the explanatory variable ‘site’ is improving the AIC of the model. stepwise selection of model:

## Single term deletions
## 
## Model:
## spp_no_rare ~ agriculture * year_ct + cos_td_rad + sin_td_rad + 
##     site
##                      Df    AIC
## <none>                  4997.0
## cos_td_rad           20 5015.2
## sin_td_rad           20 5004.7
## site                120 5100.6
## agriculture:year_ct  20 4995.4

drop interaction of agriculture with year.

## Single term deletions
## 
## Model:
## spp_no_rare ~ agriculture + year_ct + cos_td_rad + sin_td_rad + 
##     site
##              Df    AIC
## <none>          4995.4
## agriculture  20 5295.9
## year_ct      20 5012.7
## cos_td_rad   20 5013.7
## sin_td_rad   20 5003.2
## site        120 5090.1

final model includes agriculture, year sampling time of year and site.

## 
## Test statistics:
##                 wald value Pr(>wald)    
## (Intercept)          7.119     0.002 ** 
## agricultureNear     17.166     0.001 ***
## year_ct              7.599     0.001 ***
## cos_td_rad           6.435     0.016 *  
## sin_td_rad           6.384     0.011 *  
## siteLotan            6.371     0.001 ***
## siteParan            6.713     0.001 ***
## siteSamar            3.369     0.276    
## siteYahel            4.659     0.011 *  
## siteYotvata          8.718     0.001 ***
## siteZofar            4.499     0.214    
## --- 
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
## 
## Test statistic:  24.91, p-value: 0.001 
## Arguments:
##  Test statistics calculated assuming response assumed to be uncorrelated 
##  P-value calculated using 999 resampling iterations via pit.trap resampling (to account for correlation in testing).
## Analysis of Deviance Table
## 
## Model: spp_no_rare ~ agriculture + year_ct + cos_td_rad + sin_td_rad + site
## 
## Multivariate test:
##             Res.Df Df.diff   Dev Pr(>Dev)    
## (Intercept)    149                           
## agriculture    148       1 276.6    0.001 ***
## year_ct        147       1  56.8    0.001 ***
## cos_td_rad     146       1  57.4    0.001 ***
## sin_td_rad     145       1  40.4    0.023 *  
## site           139       6 334.8    0.001 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Univariate Tests:
##             Ammomanes.deserti          Ammoperdix.heyi         
##                           Dev Pr(>Dev)             Dev Pr(>Dev)
## (Intercept)                                                    
## agriculture            19.513    0.001          12.276    0.005
## year_ct                 0.182    1.000           0.298    1.000
## cos_td_rad              0.187    1.000            4.44    0.496
## sin_td_rad              3.651    0.678           0.689    0.974
## site                   23.155    0.034          11.832    0.575
##             Argya.squamiceps          Cercotrichas.galactotes         
##                          Dev Pr(>Dev)                     Dev Pr(>Dev)
## (Intercept)                                                           
## agriculture             0.04    0.989                  21.531    0.001
## year_ct                0.016    1.000                   0.023    1.000
## cos_td_rad              0.01    1.000                  15.893    0.002
## sin_td_rad             0.502    0.974                   5.291    0.435
## site                  12.892    0.475                   19.61    0.093
##             Cinnyris.osea          Columba.livia          Corvus.ruficollis
##                       Dev Pr(>Dev)           Dev Pr(>Dev)               Dev
## (Intercept)                                                                
## agriculture         0.134    0.989         4.759    0.183             0.052
## year_ct             1.588    0.931         2.419    0.818             5.675
## cos_td_rad           0.21    1.000         0.587    0.994             3.459
## sin_td_rad          1.022    0.965          0.01    0.996             2.356
## site               33.277    0.002         5.498    0.829            11.447
##                      Galerida.cristata          Iduna.pallida         
##             Pr(>Dev)               Dev Pr(>Dev)           Dev Pr(>Dev)
## (Intercept)                                                           
## agriculture    0.989            12.736    0.005         0.165    0.989
## year_ct        0.275             0.142    1.000         1.455    0.931
## cos_td_rad     0.608             2.143    0.796        11.499    0.016
## sin_td_rad     0.900              0.07    0.996         7.423    0.171
## site           0.575            15.992    0.261        10.481    0.575
##             Merops.orientalis          Oenanthe.melanura         
##                           Dev Pr(>Dev)               Dev Pr(>Dev)
## (Intercept)                                                      
## agriculture             2.058    0.603            35.967    0.001
## year_ct                 0.093    1.000            15.114    0.004
## cos_td_rad              0.078    1.000             0.052    1.000
## sin_td_rad               1.36    0.965             0.322    0.979
## site                   14.534    0.368            15.225    0.313
##             Passer.domesticus          Prinia.gracilis         
##                           Dev Pr(>Dev)             Dev Pr(>Dev)
## (Intercept)                                                    
## agriculture            25.097    0.001          18.803    0.001
## year_ct                 4.157    0.493           2.826    0.764
## cos_td_rad              3.008    0.679           1.327    0.946
## sin_td_rad              0.722    0.974            4.95    0.466
## site                   22.809    0.039          18.239    0.131
##             Ptyonoprogne.fuligula          Pycnonotus.xanthopygos         
##                               Dev Pr(>Dev)                    Dev Pr(>Dev)
## (Intercept)                                                               
## agriculture                 1.558    0.690                 19.263    0.001
## year_ct                       0.8    0.988                  0.988    0.976
## cos_td_rad                  2.309    0.791                  3.767    0.587
## sin_td_rad                  1.992    0.933                  0.807    0.974
## site                        2.915    0.831                 29.907    0.005
##             Scotocerca.inquieta          Spilopelia.senegalensis         
##                             Dev Pr(>Dev)                     Dev Pr(>Dev)
## (Intercept)                                                              
## agriculture              22.018    0.001                  36.992    0.001
## year_ct                   0.291    1.000                   7.462    0.106
## cos_td_rad                0.031    1.000                   4.066    0.544
## sin_td_rad                1.289    0.965                   1.764    0.940
## site                      18.62    0.129                  24.766    0.023
##             Streptopelia.decaocto          Streptopelia.turtur         
##                               Dev Pr(>Dev)                 Dev Pr(>Dev)
## (Intercept)                                                            
## agriculture                13.406    0.002              12.339    0.005
## year_ct                     2.317    0.818              10.859    0.020
## cos_td_rad                  3.615    0.606               0.636    0.994
## sin_td_rad                  4.471    0.528               1.722    0.940
## site                       13.148    0.470              20.585    0.065
##             Vanellus.spinosus         
##                           Dev Pr(>Dev)
## (Intercept)                           
## agriculture            17.848    0.001
## year_ct                 0.119    1.000
## cos_td_rad              0.122    1.000
## sin_td_rad              0.032    0.996
## site                    9.823    0.575
## Arguments:
##  Test statistics calculated assuming uncorrelated response (for faster computation) 
## P-value calculated using 999 iterations via PIT-trap resampling.

All factors (agriculture, year, time of year, site) have a statistically significant effect on community composition.

## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## [[1]]

## 
## [[2]]

## 
## [[3]]

## [[1]]

## 
## [[2]]

## 
## [[3]]

Significant effect of agriculture proximity: synanthrope / invasive species near agriculture, batha specialists far from agriculture. Significant temporal trend, however only few species are showing a statistically significant increase / decrease.

European turtle dove is decreasing, in accordance with what is seen in other units. House sparrow increasing, however not significant result. Blackstart increasing significant.