info.ordinal.design: Expected Information Matrix for an Ordinal Design

Description Usage Arguments Value References See Also Examples

View source: R/info.ordinal.design.R

Description

Calculates the expected information matrix for an ordinal design where the parameters p[j], probability of an event in category j or less, depend on a covariate, x, through a logistic, p[j] = exp(u[j])/(1+exp(u[j])), or complementary log, p[j] = 1 - exp(-exp(u[j])), model. The variable u[j] is a linear, u[j] = a[j] + b*x, or quadratic, u[j] = a[j] + b*x + c*x^2, function of the covariate x.

Usage

1
2
    info.ordinal.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 if model = "linear"

theta[i,] = c(a[1],a[2],a[3],…,a[r-1],b)

where r is the number of categories. If model = "quadratic"

θ[i,] = c(a[1], a[2], …, a[r-1],b,c)

theta[i,] = c(a[1],a[2],a[3],...,a[r-1],b,c)

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[j] = a[j] + b*x, and quadratic indicates, u[j] = a[j] + b*x + c*x^2 j = 1,…,r-1. 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 parameters of the ordinal model, p[j]. Logistic indicates p[j] = exp(u[j])/(1+exp(u[j])), and complementary log indicates, p[j] = 1 - exp(-exp(u[j])) j = 1,…,r-1. Only enough to ensure a unique match need be supplied.

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 proportion to the specified relative sizes. If this value is specified, it should be a vector whose length is the same as the number of rows in theta.

Value

The information matrix for one observation for this design.

If model = "linear" and there are r categories and k groups, the information matrix is a square (r*k)x(r*k) matrix which is indexed by the parameters (a[1], a[2], …, a[r-1], b) for group 1, then (a[1], a[2], …, a[r-1], b) for group 2, etc.

If model = "quadratic", the information matrix is a square ((r+1)*k)x((r+1)*k) matrix which is indexed by the parameters (a[1], a[2], …, a[r-1], b, c) for group 1, then (a[1], a[2], …, a[r-1], b, c) for group 2, etc.

References

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

See Also

info.binomial.design, info.poisson.design, info.expsurv.design

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Find the information matrix for an ordinal design
# with one group and equal sample sizes.
# Assume 4 categories and use a logistic
# line and quadratic model. Let
# u[1] = 1 + 2.5*x
# u[2] = 2 + 2.5*x
# u[3] = 3 + 2.5*x
# Use values x = -3,0,3
theta <- c(1, 2, 3, 2.5)
covar <- c(-3, 0, 3)
info.ord <- info.ordinal.design(theta = theta, xpoints = covar)
print(info.ord)

asypow documentation built on May 2, 2019, 2:37 a.m.