predict: Predict mortality based on a single model

Description Usage Arguments Value Examples

View source: R/predictions.R

Description

This function is called internally by other functions. It predicts the mortality rate (per year) of elephants based on a covariate information provided as a data frame and based on one model.

Usage

1
predict(model, newdata)

Arguments

model

A fitted model

newdata

A data frame providing the covariate values for predictions

Value

A vector with the mortality prediction(s).

Examples

1
2
3
4
d <- data.frame(Sex = "males", CaptureMethod = "STOCKAGE",
                CaptureAge = 20, Age = 30, TimeSinceCapture = 10,
                Region = "Kachin", BirthCohort = "2000")
predict(model = Models[[1]], newdata = d)

courtiol/SileR documentation built on May 16, 2020, 8:10 p.m.