Learn R Programming

asypow (version 2012.04-1)

info.binomial.design: Expected Information Matrix for a Binomial Design

Description

Calculates the expected information matrix for a binomial design where the parameter $p$, probability of an event, depends on a covariate, $x$, through a logistic, $p = \exp(u) / (1 + \exp(u))$ {p = exp(u)/(1+exp(u))}, or complementary log, $p = 1 - \exp(-\exp(u))$ {p = 1 - exp(-exp(u))}, model. The variable $u$ is either a linear, $u = a + b x$, or quadratic, $u = a + b x + c x^2$, function of the covariate $x$.

Usage

info.binomial.design(model="linear", link="logistic", theta,
                     xpoints, natx=1, group.size=1)

Arguments

theta
Matrix of parameters for the linear combination of the covariate x. Each row represents a group so theta[i,] is c(a,b) if model = "linear" or theta[i,] is c(a,b,c) if model = "quadratic".
xpoints
Matrix of covariate values for each group. If there is only 1 group or all groups have the same covariate value, xpoints should be a vector; otherwise, the number of rows in xpoints must equal the number of rows in theta.
model
One of {"linear", "quadratic"}. Specifies the function of the covariate x that will be used. Linear indicates, $u = a + b x$, and quadratic indicates, $u = a + b x + c x^2$. Only enough to ensure a unique match need be supplied.
link
One of {"logistic", "complementary log"}. Specifies the link between the linear or quadratic combination of the covariate $x$ and the parameter of the Binomial model, $p$. Logistic indicates $p = \exp(u) / (1 + \exp(u))$, and complementar
natx
Needed only if there are unequal sample sizes used at any of the values in xpoints. At covariate value xpoint[i,j] there are natx[i,j] observations. If specified, the dimensions of natx should be the same as the dimensions of xpoints.
group.size
Needed only if there are to be several groups with unequal sample sizes. The value of the i'th component is the relative sample size of the i'th group. The calculation made is for a single observation spread over the several groups in propor

Value

  • The information matrix for one observation for this design.

    If model = "linear" and there are $k$ groups, the information matrix is a square $(2 k) \times (2 k)$ matrix which is indexed by the parameters (a,b) for group 1, then (a,b) for group 2, etc.

    If model = "quadratic", the information matrix is a square $(3 k)\times (3 k)$ matrix which is indexed by the parameter (a,b,c) for group 1, then (a,b,c) for group 2, etc.

concept

information

References

Cox, D.R. and Hinkley, D.V. (1974). Theoretical Statistics Chapman and Hall, London.

See Also

info.poisson.design, info.ordinal.design, info.expsurv.design

Examples

Run this code
# Find the information matrix for a 2 group
# logistic binomial Design with a quadratic
# combination of covariate x and different
# sample sizes at each point
abc <- rbind(c(1.2, .9, .3),c(0.33, .21, .05))
covar <- c(1, 2, 3,  4,5)
sample.size <- rbind(c(10,11,12,10,9), c(8,7,10,8,9))
info.binom <- info.binomial.design(model="quadratic", link="logistic", 
                                theta = abc, xpoints = covar,
                                natx=sample.size)
print(info.binom)

Run the code above in your browser using DataLab