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.
-
-
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-.
-
-
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:
DEVIANCE('BINO', variable, , n<, >)
|
where
-
variable
-
is a numeric random variable that contains
the number of successes.
Range: |
0 variable 1 |
-
-
is a numeric mean parameter.
-
n
-
is an integer number of Bernoulli trials
parameter
Range: |
n 0 |
-
-
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.
DEVIANCE('GAMMA', variable, <,
>)
|
where
-
variable
-
is a numeric random variable.
Range: |
variable
|
-
-
is a numeric mean parameter.
-
-
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:
DEVIANCE('IGAUSS' | 'WALD', variable, <,
>)
|
where
-
variable
-
is a numeric random variable.
Range: |
variable
|
-
-
is a numeric mean parameter.
-
-
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:
DEVIANCE('NORMAL' | 'GAUSSIAN', variable,
)
|
where
-
variable
-
is a numeric random variable.
-
-
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:
DEVIANCE('POISSON', variable, <,
>)
|
where
-
variable
-
is a numeric random variable.
Range: |
variable
0 |
-
-
is a numeric mean parameter.
-
-
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:
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.