families {aster} | R Documentation |
Families for Aster Models
Description
Families (response models) known to the package.
These functions construct simple family specifications used
in specifying models for aster
and mlogl
.
They are mostly for convenience, since the specifications are easy
to construct by hand.
Usage
fam.bernoulli()
fam.poisson()
fam.truncated.poisson(truncation)
fam.negative.binomial(size)
fam.truncated.negative.binomial(size, truncation)
fam.normal.location(sd)
fam.default()
famfun(fam, deriv, theta)
Arguments
truncation |
the truncation point, called |
size |
the sample size. May be non-integer. |
sd |
the standard deviation. May be non-integer. |
fam |
a family specification, which is a list of class |
deriv |
derivative wanted: 0, 1, or 2. |
theta |
value of the canonical parameter. |
Details
Currently implemented families are
"bernoulli"
Bernoulli. The mean value parameter
is the success probability. The canonical parameter is
, also called logit of
. The first derivative of the cumulant function has the value
and the second derivative of the cumulant function has the value
.
"poisson"
Poisson. The mean value parameter
is the mean of the Poisson distribution. The canonical parameter is
. The first and second derivatives of the cumulant function both have the value
.
"truncated.poisson"
Poisson conditioned on being strictly greater than
, specified by the argument
truncation
. Letbe the mean of the corresponding untruncated Poisson distribution. Then the canonical parameters for both truncated and untruncated distributions are the same
. Let
be a Poisson random variable having the same mean parameter as this distribution, and define
Then the mean value parameter and first derivative of the cumulant function of this distribution has the value
and the second derivative of the cumulant function has the value
.
"negative.binomial"
Negative binomial. The size parameter
may be noninteger, meaning the cumulant function is
times the cumulant function of the geometric distribution. The mean value parameter
is the mean of the negative binomial distribution. The success probability parameter is
The canonical parameter is
. Since
, the canonical parameter space is restricted, the set of
such that
. This is, however, a regular exponential family (the log likelihood goes to minus infinity as
converges to the boundary of the parameter space, so the constraint
plays no role in maximum likelihood estimation so long as the optimization software is not too stupid. There will be no problems so long as the default optimizer (
trust
) is used. Since zero is not in the canonical parameter space a negative default origin is used. The first derivative of the cumulant function has the valueand the second derivative has the value
"truncated.negative.binomial"
Negative binomial conditioned on being strictly greater than
, specified by the argument
truncation
. Letbe the success probability parameter of the corresponding untruncated negative binomial distribution. Then the canonical parameters for both truncated and untruncated distributions are the same
, and consequently the canonical parameter spaces are the same, the set of
such that
, and both models are regular exponential families. Let
be an untruncated negative binomial random variable having the same size and success probability parameters as this distribution. and define
Then the mean value parameter and first derivative of the cumulant function of this distribution has the value
and the second derivative is too complicated to write here (the formula can be found in the vignette
trunc.pdf
."normal.location"
Normal, unknown mean, known variance. The sd (standard deviation) parameter
may be noninteger, meaning the cumulant function is
times the cumulant function of the standard normal distribution. The mean value parameter
is the mean of the normal distribution. The canonical parameter is
. The first derivative of the cumulant function has the value
and the second derivative has the value
Value
For all but fam.default
,
a list of class "astfam"
giving name and values of any
hyperparameters.
For fam.default
,
a list each element of which is of class "astfam"
.
The list of families which were hard coded in earlier versions of the
package.
See Also
Examples
### mean of poisson with mean 0.2
famfun(fam.poisson(), 1, log(0.2))
### variance of poisson with mean 0.2
famfun(fam.poisson(), 2, log(0.2))
### mean of poisson with mean 0.2 conditioned on being nonzero
famfun(fam.truncated.poisson(trunc = 0), 1, log(0.2))
### variance of poisson with mean 0.2 conditioned on being nonzero
famfun(fam.truncated.poisson(trunc = 0), 2, log(0.2))