Description Usage Arguments Value
View source: R/simulate_gof_function.R
This function is one of the master functions in this package. It simulates and analyzes a single dataset that is over-dispersed in observations, n_obs. To do this many times, use an apply function. It's currently simplified and assumes constant abundance, detection, and transect length. It does not (yet) simulate goodness-of-fit metrics. It simulates both point count and distance data and analyses both datasets using both unmarked and optim.
1 2 3 4 5 6 | simulate_gof_function(
filename = NA,
simulate_gof_sims = 5,
simulate_gof_parallel = F,
savefilename = "set 3/datasets/data"
)
|
filename |
full path and name of data file saved by the "simulate_function_nobs" function. |
simulate_gof_sims |
The number of times to simulate goodness of fit values |
simulate_gof_parallel |
Logical. Whether or not to do the goodness of fit simulations in parallel. The default is FALSE, since I typically run the entire function in parallel, not just parts of the internal calculations. |
savefilename |
The simulated datasets and results ARE saved to file (currently not optional). This provides the path and filename for saving the intermediate steps in the analysis. |
if everything works well, it returns a list with the results of taking the data.frame output from simulation_function_nobs, simulating lots of datasets with set each parameter estimates, calculates a GOF metric for each one, summarizes them, and returns p-values for each one. It puts the results right back into the data.frame and returns and whole list with the simulated dataset, and original analysis. The only difference is the p-values added into the results data.frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.