predict.dispfit: Predicted data from dispersal kernel fit for dispersal data

View source: R/predict.dispfit.R

predict.dispfitR Documentation

Predicted data from dispersal kernel fit for dispersal data

Description

Plots the distributions previously fitted by dispersal.kernel against the data density plot.

Usage

## S3 method for class 'dispfit'
predict(data, fit.criteria = NULL, criteria.dif = 2, envelopes = TRUE)

Arguments

data

Output object from the dispersal.kernel function.

fit.criteria

Either a numeric value referring to the number of distributions to plot (ordered according to the order.by argument from dispersal.kernel); a character string choosing to plot “all” distributions, to plot the distributions with an “AIC”, “AICc”, or “BIC” difference to the top distribution bellow the number set by criteria.dif, or to plot specific distributions. By default, only the top distribution is plotted.

criteria.dif

A numeric value used when “AIC”, “AICc”, or "BIC" are also selected in fit.criteria. Its value refers to the estimator difference to the top distribution. Only distributions with their estimator difference to the top model falling below this value will be plotted. The default is 2.

envelopes

A boolean (TRUE/FALSE) value choosing whether to calculate the confidence envelopes associated with each distribution. Default is TRUE.

See Also

dispersal.kernel

Examples

## simulate data from lognormal distribution
set.seed(1111)
simulated.data <- rlnorm(200, meanlog = 5, sdlog = 1)

## run dispersal.kernel function
fit <- dispersal.kernel(simulated.data)

## predict data based on fit
predict(fit)

apferreira/dispfit documentation built on April 16, 2023, 4:18 a.m.