constancy: Constancy Spaces for Aster Models

Description Usage Arguments Details Value See Also Examples

Description

Produce basis for constancy space of an aster model. Test whether the difference of two canonical parameter vectors is in the constancy space (so the two parameter vectors correspond to the same probability model).

Usage

1
2
3
constancy(data, parm.type = c("theta", "phi"))
is.same(parm1, parm2, data, parm.type = c("theta", "phi"),
    tolerance = sqrt(.Machine$double.eps))

Arguments

data

an object of class "asterdata" produced by asterdata or “by hand” such that is.validasterdata(data) returns TRUE. The specification of the aster model.

parm.type

the parametrization for which the constancy space is wanted.

parm1

a parameter vector of the type specified by parm.type for the saturated aster model specified by data.

parm2

another parameter vector of the type specified by parm.type for the saturated aster model specified by data.

tolerance

numeric >= 0. Relative errors smaller than tolerance are not considered in the comparison.

Details

There is no need for functions to test whether different mean value parameters (xi or mu) correspond to the same probability distribution because these parametrizations are identifiable (different valid parameter vectors correspond to different probability distributions).

Value

for is.same a logical value; for constancy a matrix whose rows constitute a basis for the constancy space. This means that if delta is a linear combination of rows of this matrix then for all real s the distributions having parameter vectors psi and psi + s * delta are the same, where psi = theta or psi = phi depending on whether parm.type = "theta" or parm.type = "phi". Conversely, if psi1 and psi2 are valid parameter vectors of the same type, then they correspond to the same probability distribution only if psi1 - psi2 is a linear combination of rows of this matrix.

See Also

asterdata

Examples

1
2
3
4
5
6
7
8
data(test1)
fred <- asterdata(test1,
    vars = c("m1", "m2", "m3", "n1", "n2", "b1", "p1", "z1"),
    pred = c(0, 0, 0, 1, 1, 2, 3, 6), group = c(0, 1, 2, 0, 4, 0, 0, 0),
    code = c(1, 1, 1, 2, 2, 3, 4, 5),
    families = list(fam.multinomial(3), "normal.location.scale",
    "bernoulli", "poisson", "zero.truncated.poisson"))
cmat <- constancy(fred, parm.type = "phi")

aster2 documentation built on May 2, 2019, 11:02 a.m.