Learn R Programming

MRCV (version 0.3-3)

predict.genloglin: Calculate Observed and Model-Predicted Odds Ratios for MRCV Data

Description

The predict.genloglin method function calculates observed and model-predicted odds ratios and their confidence intervals using results from genloglin. It offers an asymptotic normal approximation for estimating the confidence intervals for the observed and model-predicted odds ratios, and a bootstrap approach for estimating the confidence intervals for the model-predicted odds ratios.

Usage

"predict"(object, alpha = 0.05, pair = "WY", print.status = TRUE, ...)

Arguments

object
An object of class 'genloglin' produced by the genloglin function.
alpha
The desired alpha level. The predict.genloglin function provides two-sided (1-alpha)x100% confidence intervals.
pair
For the case of three MRCVs, a character string specifying the pair of items for which odds ratios will be calculated: "WY" indicates odds ratios should be calculated for each (Wi, Yj) pair conditional on the response for each Zk, "WZ" indicates conditional odds ratios should be calculated for each (Wi, Zk) pair, and "YZ" indicates conditional odds ratios should be calculated for each (Yj, Zk) pair.
print.status
A logical value indicating whether bootstrap progress updates should be provided.
...
Additional arguments passed to or from other methods.

Value

--- A list containing at least original.arg, OR.obs, and OR.model.asymp.original.arg is a list containing the following objects:
  • data: The original data frame supplied to the data argument.
  • I: The original value supplied to the I argument.
  • J: The original value supplied to the J argument.
  • K: The original value supplied to the K argument.
  • nvars: The number of MRCVs.
  • alpha: The original value supplied to the alpha argument.
OR.obs is a numeric matrix. For the two MRCV case, the matrix contains IxJ rows corresponding to the IxJ possible pairs (Wi, Yj) and 3 columns, where column 1 corresponds to the observed odds ratio for (Wi, Yj) and columns 2 and 3 correspond to the estimated lower and upper confidence bounds, respectively. For the three MRCV case, the matrix contains 2xIxJxK rows corresponding to all possible combinations of pair conditional on the response for each item of the 3rd MRCV, and 3 columns as described for the 2 MRCV case.OR.model.asymp is a numeric matrix similar to OR.obs but where column 1 corresponds to the model-predicted odds ratios and columns 2 and 3 correspond to the estimated lower and upper confidence bounds, respectively, using an asymptotic normal approximation.--- For boot = TRUE in the call to the genloglin function, the primary list additionally includes boot.results, a list containing the following objects:
  • B.use: The number of bootstrap resamples used.
  • B.discard: The number of bootstrap resamples discarded due to having at least one item with all positive or negative responses.
  • OR.model.BCa: A numeric matrix similar to OR.obs but where column 1 corresponds to the model-predicted odds ratios and columns 2 and 3 correspond to the estimated lower and upper confidence bounds, respectively, of the BCa intervals.

Details

Wald confidence intervals are estimated for both model-based (see Appendix A of Bilder and Loughin, 2007) and observed (see Agresti, 2013, p. 70) odds ratios.

A bootstrap method is also available which provides bias-corrected accelerated (BCa) confidence intervals for the model-predicted odds ratios. See Efron (1987) for more information about BCa intervals. The predict.genloglin function uses a jackknife approximation for estimating the empirical influence values.

The bootstrap confidence intervals are available only when boot = TRUE in the original call to the genloglin function.

References

Agresti, A. (2013) Categorical data analysis (3rd ed.). Hoboken, New Jersey: John Wiley & Sons.

Bilder, C. and Loughin, T. (2007) Modeling association between two or more categorical variables that allow for multiple category choices. Communications in Statistics--Theory and Methods, 36, 433--451.

Efron, B. (1987) Better bootstrap confidence intervals. Journal of the American Statistical Association, 82, 171--185.

Examples

Run this code
## For examples see help(genloglin).

Run the code above in your browser using DataLab