Learn R Programming

aster (version 0.7-4)

families: 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 $k$ in the details section below.
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 "astfam" containing, at least one element named "name" and perhaps other elements specifying hyperparameters.
deriv
derivative wanted: 0, 1, or 2.
theta
value of the canonical parameter.

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.

Details

Currently implemented families are [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

See Also

aster and mlogl

Examples

Run this code
### 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))

Run the code above in your browser using DataLab