smartsurv: Evaluate nodes for value in invasion detection (based on a...

Description Usage Arguments Examples

View source: R/smartsurv.R

Description

Evaluate nodes for utility in invasion detection (based on a specified number of realizations) using the function multistart (which in turn uses the function onestart). outarr saves the output from each realization from multistart, in a 3D array. In meanarr, rows = starting nodes (introduction nodes), columns = sampling nodes, and entries = mean nodes free from invasion when invasion starting at the introduction node reaches the sampling node. In vararr, for the same rows and columns, entries are the variance in the number of nodes free from invasion. Note that nrealz=1 is all that is needed if there is no stochastic component.

Usage

1
smartsurv(adjmat, stoch, nrealz = 1)

Arguments

adjmat

adjacency matrix for evaluation

stoch

logical var indicating whether adjacency matrix entries are fixed or probabilities

nrealz

number of realizations to be analyzed (just 1 is needed if stoch=F)

Examples

1
2
3
4
Amat <- matrix(c(1,0,0,0,1,1,0,0,0,1,1,0,1,1,1,1),nrow=4,ncol=4)
smartsurv(adjmat=Amat, stoch=F, nrealz=1)
sAmat <- Amat * 0.7
smartsurv(adjmat=sAmat, stoch=T, nrealz=10)

GarrettLab/SeaMonster2 documentation built on Dec. 17, 2021, 9:27 p.m.