Step Model Word Instructions
Step Model Word Instructions
#master function
primatestepmodel <- function(distance, angledat, runs=200, initthresh=100,
totdthresinc=5, totdthresh=500, threshper=10, plot=FALSE){
# initialize the total run counter
l = 1
# intialize the shortest distance between starting and ending points
vector
directd = 0
# intialize the difference between the traveled and direct distance
vector
diffd = 0
# intialize the total distance traveled vector
totd = 0
# initialize the ratio of direct distance by distance traveled vector
ratio = 0
#intialize the threshold vector
threshold = initthresh
thresruns = 0
#save the primate step model into a data frame called "newdata"
newdata <- primatestepmodel(distance, angledat, runs=200, initthresh =100,
totdthresinc = 5, totdthresh=500, threshper = 10, plot=FALSE)
You can change the number of runs and other parameters above. Initthresh is
the smallest “target” distance, totdthresinc is the size of increase in target
distance between runs,Totdthresh is the largest target distance, thresshper is
the % within which the sum of steps is considered within target range