Chapter Contents

Previous

Next
DEVIANCE

DEVIANCE



Computes the deviance and returns a value

Category: Mathematical


Syntax
Arguments
Details
The Bernoulli Distribution
The Binomial Distribution
The Gamma Distribution
The Inverse Gauss (Wald) Distribution
The Normal Distribution
The Poisson Distribution

Syntax

DEVIANCE(distribution, variable, shape-parameter(s)<,[epsiv]>)

Arguments

distribution
is a character string that identifies the distribution. Valid distributions are

Distribution Argument
Bernoulli
'BERNOULLI' | 'BERN'
Binomial
'BINOMIAL' | 'BINO'
Gamma
'GAMMA'
Inverse Gauss (Wald)
'IGAUSS' | 'WALD'
Normal
'NORMAL' | 'GAUSSIAN'
Poisson
'POISSON' | 'POIS'

variable
is a numeric random variable.

shape-parameter(s)
are one or more distribution-specific numeric parameters that characterize the shape of the distribution.

[epsiv]
is an optional numeric small value used for all of the distributions, except for the normal distribution.


Details

The Bernoulli Distribution


Syntax

DEVIANCE('BERNOULLI', variable, p<, [epsiv]>)

where

variable
is a binary numeric random variable that has the value of 1 for success and 0 for failure.

p
is a numeric probability of success with [epsiv] [le] p [le] 1-[epsiv].

[epsiv]
is an optional positive numeric value that is used to bound p. Any value of p in the interval 0 [le] p [le] [epsiv] is replaced by [epsiv]. Any value of p in the interval 1 - [epsiv] [le] p [le] 1 is replaced by 1 - [epsiv].

The DEVIANCE function returns the deviance from a Bernoulli distribution with a probability of success p, where success is defined as a random variable value of 1. The equation follows:

[IMAGE]


The Binomial Distribution


Syntax

DEVIANCE('BINO', variable, [mu], n<, [epsiv]>)

where

variable
is a numeric random variable that contains the number of successes.
Range: 0 [le] variable [le] 1

[mu]
is a numeric mean parameter.
Range: n[epsiv] [le] [mu] [le] n(1-[epsiv])

n
is an integer number of Bernoulli trials parameter
Range: n [ge] 0

[epsiv]
is an optional positive numeric value that is used to bound [mu]. Any value of [mu] in the interval 0 [le] [mu] [le] n[epsiv] is replaced by n[epsiv]. Any value of [mu] in the interval n(1 - [epsiv]) [le] [mu] [le] n is replaced by n(1 - [epsiv]).

The DEVIANCE function returns the deviance from a binomial distribution, with a probability of success p, and a number of independent Bernoulli trials n. The following equation describes the DEVIANCE function for the Binomial distribution, where x is the random variable.

[IMAGE]


The Gamma Distribution


Syntax

DEVIANCE('GAMMA', variable, [mu] <, [epsiv]>)

where

variable
is a numeric random variable.
Range: variable [ge] [epsiv]

[mu]
is a numeric mean parameter.
Range: [mu] [ge][epsiv]

[epsiv]
is an optional positive numeric value that is used to bound variable and [mu]. Any value of variable in the interval 0 [le] variable [le] [epsiv] is replaced by [epsiv]. Any value of [mu] in the interval 0 [le] [mu] [le] [epsiv] is replaced by [epsiv].

The DEVIANCE function returns the deviance from a gamma distribution with a mean parameter [mu]. The following equation describes the DEVIANCE function for the gamma distribution, where x is the random variable:

[IMAGE]


The Inverse Gauss (Wald) Distribution


Syntax

DEVIANCE('IGAUSS' | 'WALD', variable, [mu]<, [epsiv]>)

where

variable
is a numeric random variable.
Range: variable [ge] [epsiv]

[mu]
is a numeric mean parameter.
Range: [mu] [ge][epsiv]

[epsiv]
is an optional positive numeric value that is used to bound variable and [mu]. Any value of variable in the interval 0 [le] variable [le] [epsiv] is replaced by [epsiv]. Any value of [mu] in the interval 0 [le] [mu] [le] [epsiv] is replaced by [epsiv].

The DEVIANCE function returns the deviance from an inverse Gaussian distribution with a mean parameter [mu]. The following equation describes the DEVIANCE function for the inverse Gaussian distribution, where x is the random variable:

[IMAGE]


The Normal Distribution


Syntax

DEVIANCE('NORMAL' | 'GAUSSIAN', variable, [mu])

where

variable
is a numeric random variable.

[mu]
is a numeric mean parameter.

The DEVIANCE function returns the deviance from a normal distribution with a mean parameter [mu]. The following equation describes the DEVIANCE function for the normal distribution, where x is the random variable:

[IMAGE]


The Poisson Distribution


Syntax

DEVIANCE('POISSON', variable, [mu]<, [epsiv]>)

where

variable
is a numeric random variable.
Range: variable [ge] 0

[mu]
is a numeric mean parameter.
Range: [mu] [ge][epsiv]

[epsiv]
is an optional positive numeric value that is used to bound [mu]. Any value of [mu] in the interval 0 [le] [mu] [le] [epsiv] is replaced by [epsiv].

The DEVIANCE function returns the deviance from a Poisson distribution with a mean parameter [mu]. The following equation describes the DEVIANCE function for the Poisson distribution, where x is the random variable:

[IMAGE]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.