Predict the richness on an island of a given size using either individual SAR model fits, a fit_collection of model fits, or a multi-model SAR curve.

sar_pred(fit, area)

Arguments

fit

Either a model fit object, a fit_collection object (generated using sar_multi), or a sar_multi object (generated using sar_average).

area

A numeric vector of area values (length >= 1).

Value

A data.frame of class 'sars' with three columns: 1) the name of the model, 2) the area value for which a prediction has been generated, and 3) the prediction from the model extrapolation.

Details

Extrapolation (e.g. predicting the richness of areas too large to be sampled) is one of the primary uses of the SAR. The sar_pred function provides an easy method for undertaking such an exercise. The function works by taking an already fitted SAR model, extacting the parameter values and then using these values and the model function to predict the richness for any value of area provided.

If a multi-model SAR curve is used for prediction (i.e. using sar_average), the model information criterion weight (i.e. the conditional probabilities for each of the n models) for each of the individual model fits that were used to generate the curve are stored. The n models are then each used to predict the richness of a larger area and these predictions are multiplied by the respective model weights and summed to provide a multi-model averaged prediction.

Note

This function is used in the ISAR extrapolation paper of Matthews & Aspin (2019).

Code to calculate confidence intervals around the predictions using bootstrapping will be added in a later version of the package.

References

Matthews, T.J. & Aspin, T.W.H. (2019) ....

Examples

data(galap) #fit the power model and predict richness on an island of area = 5000 fit <- sar_power(data = galap) p <- sar_pred(fit, area = 5000) #fit three SAR models and predict richness on islands of area = 5000 & 10000 fit2 <- sar_multi(galap, obj = c("power", "loga", "koba"))
#> #> Now attempting to fit the 3 SAR models: #> #> -- multi_sars --------------------------- multi-model SAR -- #> > power : v #> > loga : v #> > koba : v
p2 <- sar_pred(fit2, area = c(5000, 10000)) #calculate a multi-model curve and predict richness on islands of area = 5000 & 10000 fit3 <- sar_average(data = galap)
#> #> Now attempting to fit the 20 SAR models: #> #> -- multi_sars --------------------------- multi-model SAR -- #> > power : v #> > powerR : v #> > epm1 : v #> > epm2 : v #> > p1 : v #> > p2 : v #> > loga : v #> > koba : v #> > mmf : v #> > monod : v #> > negexpo : v #> > chapman : Warning: could not compute parameters statistics #> > weibull3 : v #> > asymp : v #> > ratio : v #> > gompertz : v #> > weibull4 : v #> > betap : v #> > heleg : v #> > linear : v #> #> Model fitting completed - all models succesfully fitted. Now undertaking model validation checks. #> Additional models will be excluded if necessary:
#> #> 4 models failed the residuals normality test and have been excluded from the multi SAR: #> Extended Power model 1, Asymptotic regression, Cumulative Weibull 4 par., Linear model
#> 16 remaining models used to construct the multi SAR: #> Power, PowerR, Extended Power model 2, Persistence function 1, Persistence function 2, Logarithmic, Kobayashi, MMF, Monod, Negative exponential, Chapman Richards, Cumulative Weibull 3 par., Rational function, Gompertz, Beta-P cumulative, Heleg(Logistic) #> -------------------------------------------------------------
p3 <- sar_pred(fit3, area = c(5000, 10000))