Skip to contents

The hrBootstrap function calculates the 0, 25, 50, 75, 100% percentile of the Minimum Convex Polygon (MCP) area by a logarithmic step wise increase of the number of samples per calculation. For every step this calculation is repeated rep times with random coordinates from the track.

Usage

# S4 method for SpatialPoints
hrBootstrap(x, rep=100, plot=TRUE, level=95,
            levelMax=100, unin='km', unout='m2', ...)
  
  # S4 method for .MoveTrackStack
hrBootstrap(x, rep=100, plot=TRUE, level=95, 
            levelMax=100, unin="km", unout="m2", ...)

Arguments

x

a move, moveStack, moveBurst or SpatialPoints object

rep

numeric value for the number of repetitions per sample size, default is 100

plot

logical value that indicates whether the graph is plotted or not, default is TRUE

level

the percentage of coordinates taken into account for the MCP area size calculation in each step, default is 95 (95% of all coordinates per step are taken into account)

levelMax

the percentage of coordinates taken into account for the maximum MCP area size calculation (horizontal line in the plot)

unin

units from the input values (can be 'm' or 'km')

unout

units for the output values (can be 'm2', 'km2', or 'ha')

...

Currently not implemented

Details

The function calculates the 0, 25, 50, 75, 100% percentile of the Minimum Convex Polygon (MCP) area with a logarithmic step wise increase of the number of samples per calculation. For every step this calculation is repeated rep times with random coordinates from the track. For example it calculates 100 times the MCP area from 3 random locations and stores the area. In the next step it calculates it from 5 random locations and so on. The returned graph shows the 5 percentiles of the area sizes (see 'Values'). The dot-dashed line indicates the real MCP area size of all locations.

The hrBootstrap function passes values (samples of the track) on to the function mcp that is part of the adehabitatHR package. See the help of mcp for more information about input and output units.

Note

Plots for MoveStacks are plotted one after another, and not side by side.

Value

The values are returned in a data.frame with the units indicated by unout.

Plot legend:

- 0% percentile of mcp area: blue bottom line

- 25% percentile of mcp area: red bottom line

- 50% percentile of mcp area: black middle line

- 75% percentile of mcp area: red top line

- 100% percentile of mcp area: blue top line

- Real mcp area size of all locations: horizontal dot-dashed black line

The number of locations used in each step are printed in the console.

Author

Marco Smolla & Anne Scharf

Examples

if(requireNamespace("adehabitatHR")){
## for a Move object
  m <- move(x=rnorm(55), y=rnorm(55), time=as.POSIXct(1:55, origin="1970-1-1"), 
            proj=CRS("+proj=aeqd +ellps=WGS84"), animal='a')    
  hrBootstrap(m,rep=5, level=99, unout="m2", plot=TRUE)

## for a MoveStack object
   m2 <- move(x=rnorm(30), y=rnorm(30), time=as.POSIXct(1:30, origin="1970-1-1"), 
             proj=CRS("+proj=aeqd +ellps=WGS84"), animal='b') 
  mstack <- moveStack(list(m[30:50,],m2))
  hrBootstrap(mstack,rep=5, unout="m2", plot=FALSE) 

## for a SpatialPoints object
  hrBootstrap(as(m,"SpatialPoints"),rep=5, unout="m2", plot=TRUE) 
}
#> Loading required namespace: adehabitatHR
#> Registered S3 methods overwritten by 'adehabitatMA':
#>   method                       from
#>   print.SpatialPixelsDataFrame sp  
#>   print.SpatialPixels          sp  
#> 5 6 8 10 13 16 20 25 32 40 50
#> 5 6 8 10 13 16 20
#> Warning: less than 4 coordinates in polygon
#> 5 6 8 10 13 16 20 25
#> 5 6 8 10 13 16 20 25 32 40 50


#>           0%       25%      50%      75%     100%
#> 5   100695.9  141819.1  1163343  1940242  2568085
#> 6   253627.9  316115.9  1082413  1771739  2851151
#> 8  2432069.9 3002171.4  3323202  4831084  6900212
#> 10 2839751.6 3356533.7  3521182  3782575  4919999
#> 13 2437302.6 3508836.6  4675004  4945898  5378761
#> 16 3740226.6 4736263.0  4946791  7174997  9297650
#> 20 3948827.5 4232581.7  7615852  8701997 11601067
#> 25 4065224.0 6161252.9  7345166  7482462  8802359
#> 32 6021590.2 8872020.8  9123465  9288863 10288299
#> 40 7788990.3 9795835.5 10891051 11276604 12783296
#> 50 8384050.0 8818602.0  9402584 10686390 13168783