################################################################################### # Content: # 1. Evaluation of analyses in Marin et al # 2. Analysis of more extensive dataset including data from both the Kautokeino area and the Karasjok area # ################################################################################### # # 1. Evaluation of analyses in Marin et al ############################################################################## # 13570_2021_209_MOESM1_ESM.txt gives data from the supplementary material of Marin, A., E. Sjaastad, T. A. # Benjaminsen, M. N. M. Sara, and E. J. L. Borgenvik. 2020. # Productivity beyond density: A critique of management models for reindeer pastoralism in Norway. # Pastoralism 10:9. doi:10.1186/s13570-020-00164-3 # Variables included # District - categorical variable that gives the identity code for the reindeer herding districs included in the dataset # type - categorical variable that distinguish between district regarded as "island"-type or "mainland"-type # Year - categorical variable for the reindeer production year # year - numerical variable given as the year of the end of the reindeer production year # calf - average slaughter weights of calves for a given district and year # varit - average slaughter weights of varit (1-2 year old male reindeer) for a given district and year # density.end - reindeer density at the end of the reindeer production year # density.start - reindeer density at the end of the reindeer production year # ############################################################################### options(stringsAsFactors=F) Marin.dat<-read.table("13570_2021_209_MOESM1_ESM.txt", sep = ",", header=T) # read in the data # extract the range of years with available varit data range(Marin.dat$year[!is.na(Marin.dat$varit)]) # [1] 1997 2012 #output from above command giving the range of years # fitting the linear model to data from mainland districts and all years reported in Marin et al using # density estimates from the start of the reindeer herding year lm.marin.allyrs<-lm(varit~log(density.start), data=Marin.dat, subset=type=="mainland") round(summary(lm.marin.allyrs)$r.squared,2) # Extract r-squared from fitted model # [1] 0.31 # Higher r-squared value (0.31) than the 0.24 reported in Marin et al (2020) # fit the same model but using densities at the end of the reindeer herding year as predictor lm.marin.allyrs2<-lm(varit~log(density.end), data=Marin.dat, subset=type=="mainland") round(summary(lm.marin.allyrs2)$r.squared,2) # Extract r-squared from fitted model # [1] 0.24 # Same r-squared value as reported in Marin et al (2020) suggesting they # used densities at the end of the reindeer herding year as predictor # fit the same model but data from the subset of years 1998-2000 and densities at the end of the reindeer herding year as predictor lm.marin.subyrs<-lm(varit~log(density.end), data=Marin.dat, subset=type=="mainland"&year%in%c(1999:2001)) round(summary(lm.marin.subyrs)$r.squared,2) # Extract r-squared from fitted model # [1] 0.29 # Approximately same r-squared value as obtained for the whole dataset, suggest # no change in r-squared when extending the dataset # Extract district identity codes included in the dataset levels(factor(Marin.dat$District)) # "19" "19/32T" "20" "21" "22" "23" "24A" "24B" "25" "26" "27" "28" # "29" "32" "33" "33T" "34" "35" "36" "37" "39" "40" "41" "42" # According to Landbruksdirektoratet. 2019. Ressursregnskap for reindriftsnæringen. Reindriftsforvaltningen, Alta. (in Norwegian). # these are all districts identities associated with the Kautokeino area, and none associated with the Karasjok area. ############################################################################################# # # 2. Evaluation of more extensive dataset including data from both the Kautokeino area and the Karasjok area ############################################################################################# # 13570_2021_209_MOESM2_ESM.txt gives data on average varit slaughter weigts from the years 1998-2019 extracted # as described in the main text. # # Variables included # District - categorical variable that gives the identity code for the reindeer herding districs included in the dataset # type - categorical variable that distinguish between district regarded as "island"-type or "mainland"-type # year - numerical variable given as the year of the end of the reindeer production year # varit - average slaughter weights of varit (1-2 year old male reindeer) for a given district and year # n.varit.wt - sample size average varit slaughter weights are based on # area - area of summer pastures of reindeer district # N - reindeer population size at the end of the reindeer production year # density - reindeer density at the end of the reindeer production year (N/area) # ############################################################################### # Reading in the data and some data manipulations varit.dat<-read.table("13570_2021_209_MOESM1_ESM.txt", sep = ",", header=T) # read in the data varit.dat$log.density<-log(varit.dat$density) # calculate log(density) and save as variable log.density # Generate subset index variable coded 0 for observations with a density estimate available, more than 24 varit slaughter weight observations # mainland districts excluding district 36 and 16A, 16B and 16C subset.index<-ifelse(is.na(varit.dat$density)|varit.dat$n.varit.wt<25|varit.dat$type=="island"|varit.dat$District%in%c("16A", "16B", "16C","36"), 1, 0) # Generate subset index variable coded 0 for years 1998-2001 and subset.index = 0 and coded 1 else subset.index1 <-ifelse(subset.index==1|varit.dat$year>2001|varit.dat$year==1998, 1, 0) # Generate subset index variable coded 0 for years 2002-2019 and subset.index = 0 and coded 1 else subset.index2 <-ifelse(subset.index==1|varit.dat$year%in%c(1999, 2000, 2001), 1, 0) mean.logD<-mean(varit.dat$log.density[subset.index==0]) # calculate average log(density) for data used in analyses (subset.index==0) varit.dat$center.logD<-varit.dat$log.density-mean.logD # center estimates of log(density) # fit the linear model using data from the subset of years 1998-2001 and log(densities) as predictor lm.varit.subyrs<-lm(varit~log(density), data=varit.dat, subset=subset.index1==0) round(summary(lm.varit.subyrs)$r.squared,2) # Extract r-squared from fitted model # [1] 0.65 # Slightly lower r-squared value than the value (r-squared = 0.70) reported in Ims & Kosmo (2001) # much higher value than estimated (r-squared = 0.25) for the 1998-2001 data used in Marin et al. # fit the linear model using data from all the years 1998-2019 lm.varit.allyrs<-lm(varit~log(density), data=varit.dat, subset=subset.index==0) round(summary(lm.varit.allyrs)$r.squared,2) # Extract r-squared from fitted model #[1] 0.47 # Slightly lower r-squared value than the value estimated for 1998-2019 # much higher value than estimated (r-squared = 0.24) for the data used in Marin et al. # Figure 1 par(mar=c(5,6,2,2)) plot(varit~density, data=varit.dat, subset=subset.index==0, type="n", xaxt="n", xlab="Reindeer density", ylab="Varit slaughter weight", las=1, cex.lab=1.5, cex.axis=1.5, xlim=c(0,19) ) axis(1, at=c(0:20), labels=F, tcl=-0.5) axis(1, at=seq(0,20, by=5), labels=T, cex.axis=1.5, tcl=-0.5) points(varit~density, data=varit.dat, subset=subset.index1==0, pch=16, cex=1.5) points(varit~density, data=varit.dat, subset=subset.index2==0, pch=1, cex=1.5) lines(1:19, lm.varit.allyrs$coefficients[1]+lm.varit.allyrs$coefficients[2]*log(1:19), lty=1, lwd=3) ######################################################## # Linear mixed model with year and District fitted as random intercepts and log(density) fitted as random slope varying between District # Model fitted using centered log(density) estimates library(lme4) library(MuMIn) # fit full model lmm.full<-lmer(varit~center.logD +(center.logD|District)+(1|year), data=varit.dat, subset=subset.index==0) # Estimates from model summary(lmm.full) # calculate approximate estimates of r-squared for fixed effects r-squared - R2m, # and full model (fixed and random effects) - R2c r.squaredGLMM(lmm.full) # R2m R2c #[1,] 0.3744239 0.8035477 # fit reduced model without random log(density) slopes lmm.red<-lmer(varit~center.logD +(1|District)+(1|year), data=varit.dat, subset=subset.index==0) # calculate likelihood ratio test statistic chistat <- anova(lmm.red, lmm.full)[2,"Chisq"] # calculate p-value for test of random slopes variance being different from zero 0.5 * pchisq(chistat, 1, lower.tail=FALSE) + 0.5 * pchisq(chistat, 2, lower.tail=FALSE) # [1] 0.1548859