setup2: Set up starting conditions for INA scenario analysis

Description Usage Arguments Details Examples

View source: R/setup2.R

Description

This function sets up all starting conditions, including the estimated effect size (but not direction), the x,y coordinates of the nodes, the initial information locations, and the initial species locations. It runs functions estinfo, genlocs, and initvals. The next step after this is to address the adjacency matrices for communication and for dispersal.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
setup2(
  maneffmean3s,
  maneffsd3s,
  maneffthresh3,
  sampeffort3,
  usethreshman3,
  readgeocoords3s,
  geocoords3s,
  xrange3,
  yrange3,
  numnodes3,
  randgeo3,
  readinitinfo3,
  initinfo3,
  initinfo.dist3,
  initinfo.n3,
  initinfo.norp3,
  initinfo.p3,
  readinitbio3,
  initbio3,
  initbio.dist3,
  initbio.n3,
  initbio.norp3,
  initbio.p3,
  plotmp = F
)

Arguments

maneffmean3s

(estinfo) the underlying mean change in establishment probability (as a proportion)

maneffsd3s

(estinfo) the standard deviation of the effect

maneffthresh3

(estinfo) the threshold effect size for communicating about management (if maneffthresh3 = 0 there is no threshold so communication can always occur)

sampeffort3

(estinfo) sampling effort, where greater samping effort reduces the error in estimating the management effect

usethreshman3

() if T, the threshold for management maneffthresh3 is used to determine whether communication occurs; communication only occurs if the observed management effect is greater than maneffthresh3

readgeocoords3s

read in the xy coordinates for locations (readgeocoords3s = T) or generate the xy coordinates by calling genlocs (readgeocoords3s = F)

geocoords3s

coordinates for node geographic locations, ncol= 2 (x,y) and nrow=number of nodes (to be read in if readorgenxy = 'read')

xrange3

(genlocs) range of x coordinates

yrange3

(genlocs) range of y coordinates

numnodes3

(genlocs) the number of nodes (nn in genlocs)

randgeo3

(genlocs) if TRUE then locations are randomly generated

readinitinfo3

if T, the initial values for the vector of starting locations for the presence of information are read in rather than generated

initinfo3

the vector of initial values read in if readinitinfo3 == T, a vector with lenth equal to the number of nodes and entries 1s or 0s with 1s indicating the initial presence of information

initinfo.dist3

(initvals) the type of locations where initial presence occurs: 'random' indicates all equally likely, 'upedge' indicates that nodes closest to the upper edge have presence, 'rightedge' indicates that nodes closest to the right edge have presence

initinfo.n3

(initvals) the number of initial locations for presence

initinfo.norp3

(initvals) 'num' indicates initial number for presence, 'prop' indicates initial proportion

initinfo.p3

(initvals) the proportion of initial locations for presence (ip in initvals)

readinitbio3

if T, the initial values for the vector of starting locations for the presence of the bioentity are read in rather than generated

initbio3

the vector of initial values read in if readinitbio3 == T, a vector with lenth equal to the number of nodes and entries 1s or 0s with 1s indicating the initial presence of the bioentity

initbio.dist3

bioentity (initvals) the type of locations where initial presence occurs: 'random' indicates all equally likely, 'upedge' indicates that nodes closest to the upper edge have presence, 'rightedge' indicates that nodes closest to the right edge have presence

initbio.n3

bioentity (initvals) the number of initial locations for presence

initbio.norp3

bioentity (initvals) 'num' indicates initial number for presence, 'prop' indicates initial proportion

initbio.p3

bioentity (initvals) the proportion of initial locations for presence (ip in initvals)

plotmp

if T plots of initial presence of information and species are generated

Details

Updated 2020-09-05

Examples

1
2
3
x2 <- setup2(maneffmean3s=0.5, maneffsd3s=0.5, maneffthresh3=0.5, sampeffort3=1, usethreshman3=T, readgeocoords3s=F, xrange3=c(0,50), yrange3=c(0,50), numnodes3=100, randgeo3=TRUE, readinitinfo3=F, initinfo.dist3='random', initinfo.n3=5, initinfo.norp3='num', readinitbio3=F, initbio.dist3='upedge', initbio.n3=5, initbio.norp3='num', plotmp=T)
x3 <- setup2(maneffmean3s=0.5, maneffsd3s=0.5, maneffthresh3=0.5, sampeffort3=1, usethreshman3=T, readgeocoords3s=F, xrange3=c(0,50), yrange3=c(0,50), numnodes3=100, randgeo3=TRUE, readinitinfo3=F, initinfo.dist3='random', initinfo.n3=15, initinfo.norp3='num', readinitbio3=F, initbio.dist3='upedge', initbio.n3=15, initbio.norp3='num', plotmp=T)
x4.readgeocoords3s <- setup2(maneffmean3s=0.5, maneffsd3s=0.5, maneffthresh3=0.5, sampeffort3=1, usethreshman3=T, readgeocoords3s=T, geocoords3s=matrix(c(1,1, 1,2, 1,3, 2,1, 2,2, 2,3),byrow=T,ncol=2), readinitinfo3=F, initinfo.dist3='random', initinfo.n3=2, initinfo.norp3='num', readinitbio3=F, initbio.dist3='upedge', initbio.n3=3, initbio.norp3='num', plotmp=T)

GarrettLab/INApreliminary documentation built on June 7, 2021, 10:59 a.m.