simulate.senlm | R Documentation |
Simulate from senlm model fit, nsim times, using x values in newdata, or actual x values.
## S3 method for class 'senlm' simulate(object, nsim = 1, seed = NULL, newdata = NULL, ...)
object |
Model fit. |
nsim |
Number of simulations to perform. Default value of one. |
seed |
Random number seed. |
newdata |
x values to predict y values from. Optional, data values used by default. |
... |
additional optional arguments. |
Data frame of predicted y values.
## Not run: ## Simulate data model <- set_models(mean_fun="gaussian", err_dist="zip") fit <- senlm(model=model, data=haul, xvar="depth", yvar="Sebastolobus.altivelis") simulate(fit) ## Simulate two data sets with x=400,600,and 800 simulate(fit, nsim=2, newdata=c(400,600,800)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.