Description Usage Arguments Value References See Also Examples
View source: R/info.ordinal.kgroup.R
Calculates expected information matrix for a single observation for ordered outcomes in a single or multiple groups.
The natural null hypothesis for a single group is that the probabilities of the outcomes is some specified set of values. For multiple groups, the natural null hypothesis is that the probabilities are the same.
1 | info.ordinal.kgroup(p, group.size=1)
|
p |
If there are n ordered outcome categories and k groups then p will have dimension k X (n-1). If the number of groups is one, then p can be a vector of length (n-1). Within a single group, p[i] is the probability that the outcome of a trial is some category j with j <= i. Consequently, the p[i] must be monotonely increasing with k. If there are n categories, of necessity p[n] == 1, so this redundant value is not included. Within a single group, the probability that the outcome is category 1 is p[1]. For 2 <= i < n the probability that the outcome is category k is p[i] - p[i-1]. The probability of outcome n is 1 - p[n-1]. |
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 sample size. If this value is specified, it should be a vector whose length is the row dimension of p. |
Expected information matrix for a single observation. The matrix is dimensioned (k(n-1))\times (k(n-1)) ( k*(n-1) ) X ( k*(n-1) ).
Cox, D.R. and Hinkley, D.V. (1974). Theoretical Statistics Chapman and Hall, London.
info.binomial.kgroup
,
info.poisson.kgroup
,
info.expsurv.kgroup
1 2 3 4 5 6 7 8 | # Find the information matrix for a 2 group ordinal
# model with 4 categories.
p1 <- c(.1, .2, .3) # Probabilities for group 1
p2 <- c(.2, .5, .7) # Probabilities for group 2
p <- rbind(p1,p2)
ngrps <- c(.4, .6) # Percentage of data in each group
info.ord <- info.ordinal.kgroup(p, ngrps)
print(info.ord)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.