plotmodelfit | R Documentation |
Makes plot of data and one fitted dynamic model. Can also add an additional fitted model to an existing plot
plotmodelfit(
x,
r,
N0 = NULL,
N1 = NULL,
K = NULL,
type = "Process",
add.to.plot = F,
diagnostic = F,
diagnostic.type = NULL
)
x: |
the data frame containing month and population abundances |
r: |
the fitted parameter r |
N0: |
the fitted parameter N0 (only used for process error models) |
N1: |
the fitted parameter N1 (only used for observation error models) |
K: |
the fitted parameer K (only used for density dependent models |
type: |
must be either "Process" or "Observation". Density independent model appears as a blue line, Density dependent model appears as red line |
add.to.plot: |
if TRUE, then adds fitted model to an existing plot. |
diagnostic: |
if TRUE, then plots one of three diagnostics (must include diagnostic type) |
diagnostic.type: |
must be either "obs_vs_predicted", "res_vs_predicted", or "res_vs_time" |
#Plot best fitting process, density independent model with data
di.mle.pars <- proc.di.fit$par
plotmodelfun(x = voles,
r = di.mle.pars[1],
N0= = di.mle.pars[2])
type = "Process")
# Add density dependent model fit to existing plot:
dd.mle.pars <- proc.dd.fit$par
plotmodelfun(x = voles,
r = dd.mle.pars[1],
K = dd.mle.pars[2],
N0 = dd.mle.pars[3]
type = "Process",
add.to.plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.