View source: R/simConnectivity.R

simProbData | R Documentation |

Simulate Dirichlet-based probability table data

```
simProbData(
psi,
originRelAbund,
sampleSize,
shapes,
captured = "target",
requireEveryOrigin = FALSE
)
```

`psi` |
Transition probabilities between B origin sites and W target sites. B by W matrix |

`originRelAbund` |
Vector of relative abundances at B origin sites |

`sampleSize` |
Either the total number of data points to simulate or a vector with the number at each target or origin site. If only the total is provided, sampling will be done in proportion to abundance |

`shapes` |
If captured == "target", a B by B matrix, each row of which is the shape parameters for the Dirichlet distribution of an animal whose true origin assignment is that row's. If captured == "origin", a W by W matrix, each row of which is the shape parameters for the Dirichlet distribution of an animal whose true target assignment is that row's. |

`captured` |
Either "target" (the default) or "origin", indicating which side animal data were collected on |

`requireEveryOrigin` |
If TRUE, the function will throw an error if it looks like at least one origin site has no animals released in or migrating to it, or if it can, keep simulating until representation is met. This helps estTransition or estMC not throw an error. Default FALSE |

`simProbData`

returns a list with the elements:

`originAssignment`

Vector with true origin site of each animal

`targetAssignment`

Vector with true target site of each animal

`genProbs`

Table of assignment site probabilities for each animal

`input`

List containing the inputs to function

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.