| Functions and CALL Routines | 
Returns the deviance based on a probability distribution.
DEVIANCE(distribution, variable,
shape-parameters<, >)
 | 
   
- 
distribution
 
- 
is a character constant, variable, or expression
that identifies the distribution. Valid distributions are listed in the following
table:
  | 
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 constant, variable, or expression.
 
- 
shape-parameter
 
- 
are one or more distribution-specific numeric
parameters that characterize the shape of the distribution.
 
- 
![[epsiv]](../../../../common/63294/HTML/default/images/epsil.gif)
 
- 
is an optional numeric small value used
for all of the distributions, except for the normal distribution.
 
DEVIANCE('BERNOULLI', variable, p<,
 >)
 | 
  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 
 
 p 
1-
.
 
- 
![[epsiv]](../../../../common/63294/HTML/default/images/epsil.gif)
 
- 
is an optional positive numeric value that
is used to bound p. Any value of p in the interval
0 
 p 
 
 is replaced by 
. Any value of p in the interval 1 - 
 
 p 
 1 is replaced
by 1 - 
.
 
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:
![[equation]](images/deqn82.gif)
DEVIANCE('BINO', variable,  , n<,  >)
 | 
  where 
- 
variable
 
- 
is a numeric random variable that contains
the number of successes.
| Range: | 
0   variable   1 | 
 
- 
![[mu]](../../../../common/63294/HTML/default/images/mul.gif)
 
- 
is a numeric mean parameter.
 
- 
n
 
- 
is an integer number of Bernoulli trials
parameter
| Range: | 
n   0 | 
 
- 
![[epsiv]](../../../../common/63294/HTML/default/images/epsil.gif)
 
- 
is an optional positive numeric value that
is used to bound 
. Any value of 
 in the
interval 0 
 
 
 n
 is replaced by n
. Any value of 
 in the interval n(1 - 
) 
 
 n is replaced by n(1 - 
).
 
 
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.
![[equation]](images/deqn83.gif)
DEVIANCE('GAMMA', variable,   <,
 >)
 | 
where 
- 
variable
 
- 
is a numeric random variable.
| Range: | 
variable  
![[epsiv]](../../../../common/63294/HTML/default/images/epsil.gif)  | 
 
- 
![[mu]](../../../../common/63294/HTML/default/images/mul.gif)
 
- 
is a numeric mean parameter.
 
- 
![[epsiv]](../../../../common/63294/HTML/default/images/epsil.gif)
 
- 
is an optional positive numeric value that
is used to bound variable and 
. Any value of variable in the interval 0 
 variable 
 
 is replaced by
. Any value of 
in the interval 0 
 
 
 
 is replaced
by 
.
 
The DEVIANCE function returns the deviance from a gamma
distribution with a mean parameter 
. The following equation
describes the DEVIANCE function for the gamma distribution, where x is the random variable:
![[equation]](images/deqn84.gif)
DEVIANCE('IGAUSS' | 'WALD', variable,  <,
 >)
 | 
 where
- 
variable
 
- 
is a numeric random variable.
| Range: | 
variable  
![[epsiv]](../../../../common/63294/HTML/default/images/epsil.gif)  | 
 
- 
![[mu]](../../../../common/63294/HTML/default/images/mul.gif)
 
- 
is a numeric mean parameter.
 
- 
![[epsiv]](../../../../common/63294/HTML/default/images/epsil.gif)
 
- 
is an optional positive numeric value that
is used to bound variable and 
. Any value of variable in the interval 0 
 variable 
 
 is replaced by
. Any value of 
in the interval 0 
 
 
 
 is replaced
by 
.
 
 
The DEVIANCE function returns the deviance from an inverse
Gaussian distribution with a mean parameter 
. The following
equation describes the DEVIANCE function for the inverse Gaussian distribution,
where x is the random variable:
![[equation]](images/deqn85.gif)
DEVIANCE('NORMAL' | 'GAUSSIAN', variable,
 )
 | 
  where
- 
variable
 
- 
is a numeric random variable.
 
- 
![[mu]](../../../../common/63294/HTML/default/images/mul.gif)
 
- 
is a numeric mean parameter.
 
The DEVIANCE function returns the deviance from a normal
distribution with a mean parameter 
.  The following equation
describes the DEVIANCE function for the normal distribution, where x is the random variable:
![[equation]](images/deqn86.gif)
DEVIANCE('POISSON', variable,  <,
 >)
 | 
where
- 
variable
 
- 
is a numeric random variable.
| Range: | 
variable  
0 | 
 
- 
![[mu]](../../../../common/63294/HTML/default/images/mul.gif)
 
- 
is a numeric mean parameter.
 
- 
![[epsiv]](../../../../common/63294/HTML/default/images/epsil.gif)
 
- 
is an optional positive numeric value that
is used to bound 
.  Any value of 
 in the
interval 0 
 
 
 
 is replaced by 
.
 
 
The DEVIANCE function returns the
deviance from a Poisson
distribution with a mean parameter 
.  The following equation
describes the DEVIANCE function for the Poisson distribution, where x is the random variable:
![[equation]](images/deqn87.gif)
 
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.