Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

calc.deviance

Calculate deviance


Description

Function to calculate deviance given two vectors of observed and predicted values. Requires a family argument which is set to binomial by default

Usage

calc.deviance(obs, pred, weights = rep(1,length(obs)), 
                family="binomial", calc.mean = TRUE)

Arguments

obs

a vector with observed values

pred

a vector with predicted values that correspond the the values in obs

weights

a vector of weight values

family

One of "binomial", "bernoulli", "poisson", "laplace", or "gaussian"

calc.mean

Logical. If TRUE, the mean deviance is returned

Author(s)

John R. Leathwick and Jane Elith


dismo

Species Distribution Modeling

v1.3-3
GPL (>= 3)
Authors
Robert J. Hijmans, Steven Phillips, John Leathwick and Jane Elith
Initial release
2020-11-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.