PK €|X Ü Ü suppl-1.htmUT <”f<”f
Haiganoush K. Preisler, Alan A. Ager, Michael J. Wisdom. 2013. Analyzing animal movement patterns using potential functions. Ecosphere 4:32. http://dx.doi.org/10.1890/ES12-00286.1
Supplement
R script and resulting output for estimating the potential surface described in Eq. 3 with data on elk during ATV treatment days.
Ecological Archives C004-002-S1.
Authors
File list (downloads)
Description
Haiganoush K. Preisler
Pacific Southwest Research Station
800 Buchanan St. WAB
Albany, CA 94706 USA
File list
Rcode.txt (MD5: 3a4be4656cbeaf094a3f6d4e6dfebba6)
Description
The R-code included shows how the linear mixed model lme may be used to estimate the coefficients in Eq. 8 in the main text necessary for evaluating the potential surface in Eq. 7 with results given in Figs. 5 and 6.
ESA Publications | Ecological Archives | Permissions | Citation | Contacts
PK”Ñm:Ü Ü PK €|X ¶ ¶ Rcode.txtUT <”f<”flibrary(nlme) ############################################################################## #load data # xloc and yloc ~ easting- and northing-coordinate of elk at time t1 # xdist and ydist ~ easting and northing-coordinate of closest disturbance at time t1 # delt ~ time interval (minutes) between consecutive elk locations (t2-t1) # delx and dely ~ step size in easting- and northing-direction during time interval delt # id ~ elk identity # # jday : Julian day since start of experiment # # ltime : time (in seconds) since start of experiment # ############################################################################## data=read.table(‘c:/WorkSpace/Elk&ATV data.txt’, header=T) dx = (xloc-xdist) ; dy = (yloc – ydist) d=sqrt( dx^2 + dy^2 ) #distance between elk and disturbance X1= c(dx/d, dy/d); X2 = 2*c(dx, dy) ; X3 = 3*d*c(dx, dy); X4 = 3*d^2*c(dx, dy) Y=c(delx,dely) ; Jday=c(jday,jday); Ind=c(ind,ind); Ltime=c(ltime,ltime) ID=rep(1:2,c(delx,delx)) ejd=interaction(ID,Jday,Ind) #identify unique values within groups cr3=corAR1(form=~Ltime|ejd) ################################################################################### #Next fit a linear mixed effect model with serial correlation to equation [8] assuming H1x=H1y=0, #since no significant movement between foraging and resting areas was observed during the daytime hours. #################################################################################### fit.lme= lme( Y~X1+X2+X3+X4-1, random=~1 | ejd, cor=cr3) #lines after summary are output of from the lme model fit summary(fit.lme) Linear mixed-effects model fit by REML Data: NULL AIC BIC logLik 142619.6 142673.8 -71302.79 Random effects: Formula: ~1 | ejd (Intercept) Residual StdDev: 1.533101 15.92081 Correlation Structure: ARMA(1,0) Formula: ~Ltime | ejd Parameter estimate(s): Phi1 0.3873902 Fixed effects: Y ~ X1 + X2 + X3 + X4 - 1 Value Std.Error DF t-value p-value X1 8.726936 1.0558084 16391 8.265644 0.0000 X2 -0.004315 0.0007928 16391 -5.443358 0.0000 X3 0.000001 0.0000002 16391 3.561291 0.0004 X4 0.000000 0.0000000 16391 -2.351842 0.0187 Correlation: X1 X2 X3 X2 -0.931 X3 0.851 -0.975 X4 -0.777 0.926 -0.985 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -7.717859963 -0.168004664 0.003692304 0.196833538 14.901391754 Number of Observations: 17026 Number of Groups: 632 #next line gives estimated coefficients fit.lme$coeff$fixed X1 X2 X3 X4 8.726936e+00 -4.315392e-03 8.216497e-07 -5.273104e-11 ############################################################################### #The line above are the estimated values of the {ß1, ß2, ß3, ß4} coefficient for the ATV treatment. #These values were plugged into equation [7] to obtain the estimate of the potential surface for ATV # as a function of distance to the ATV as seen in Figs. 5 and 6. ################################################################################# ################################################## #Following are first five lines of data file #Elk&ATV data.txt data file ################################################### id xloc yloc xdist ydist delt delx dely jday ltime 768 380929 5014579 379520 5015825 5.066667 121 48 118 1909.499 768 381050 5014627 380514 5015061 9.733333 274 -458 118 1909.803 768 381324 5014169 380506 5015151 5.000000 -305 -5 118 1910.387 768 381019 5014164 380907 5016483 5.166667 -191 153 118 1910.687 768 380828 5014317 380242 5017686 5.966667 393 -232 118 1910.997 PK¢—Y˶ ¶ PK- €|X”Ñm:Ü Ü @ suppl-1.htmUT <”fPK- €|X¢—Y˶ ¶ @" Rcode.txtUT <”fPK ‚ #