Learn R Programming

MRCV (version 0.3-3)

anova.genloglin: Perform MRCV Model Comparison Tests

Description

The anova.genloglin method function offers second-order Rao-Scott and bootstrap adjusted model comparison and goodness-of-fit (Pearson and LRT) statistics appropriate for evaluating models estimated by the genloglin function.

Usage

"anova"(object, model.HA = "saturated", type = "all", gof = TRUE, print.status = TRUE, ...)

Arguments

object
An object of class 'genloglin' produced by the genloglin function.
model.HA
For the two MRCV case, a character string specifying one of the following models to be compared to the null model (where the null model should be nested within the alternative model): "homogeneous" (the homogeneous association model), "w.main" (the w-main effects model), "y.main" (the y-main effects model), "wy.main" (the w- and y-main effects model), or "saturated". Alternatively, a user-supplied formula can be specified. For the three MRCV case, only "saturated" or user-supplied formulas are accepted.
type
A character string specifying one of the following approaches for performing adjusted model comparison tests: "boot" specifies a bootstrapping procedure; "rs2" specifies a Rao-Scott second-order adjustment; "all" specifies both approaches.
gof
A logical value indicating whether goodness-of-fit statistics should be calculated in addition to model comparison statistics. For model.HA = "saturated", model comparison statistics and goodness-of-fit statistics are identical, so only one set of statistics is presented.
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 the following objects: original.arg and test.statistics.original.arg is a list containing the following objects:
  • model: The original model specified in the call to the genloglin function.
  • model.HA: The alternative model specified for the model.HA argument.
  • gof: The original value supplied to the gof argument.
test.statistics is a list containing at least the following objects:
  • Pearson.chisq: The Pearson model comparison statistic calculated using the observed data.
  • lrt: The LRT model comparison statistic calculated using the observed data.
If gof = TRUE, test.statistics additionally contains
  • Pearson.chisq.gof: The Pearson goodness-of-fit statistic calculated using the observed data.
  • lrt.gof: The LRT goodness-of-fit statistic calculated using the observed data.
--- For type = "boot", the primary list additionally includes boot.results, a list containing at least 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.
  • p.chisq.boot: The bootstrap p-value for the Pearson model comparison test.
  • p.lrt.boot: The bootstrap p-value for the LRT model comparison test.
If gof = TRUE, boot.results additionally contains
  • p.chisq.gof.boot: The bootstrap p-value for the Pearson goodness-of-fit test.
  • p.lrt.gof.boot: The bootstrap p-value for the LRT goodness-of-fit test.
--- For type = "rs2", the primary list additionally includes rs.results, a list that includes at least Pearson.chisq.rs and lrt.rs.Pearson.chisq.rs is a list containing the following objects:
  • Pearson.chisq.rs: The Rao-Scott second-order adjusted Pearson model comparison statistic.
  • df: The Rao-Scott second-order adjusted degrees of freedom for the model comparison statistic.
  • p.value: The p-value for the Rao-Scott second-order adjusted Pearson model comparison test.
lrt.rs is a list containing the following objects:
  • lrt.rs: The Rao-Scott second-order adjusted LRT model comparison statistic.
  • df: Same as df given above.
  • p.value: The p-value for the Rao-Scott second-order adjusted LRT model comparison test.
If gof = TRUE, rs.results additionally includes Pearson.chisq.gof.rs and lrt.gof.rs.Pearson.chisq.gof.rs is a list containing the following objects:
  • Pearson.chisq.gof.rs: The Rao-Scott second-order adjusted Pearson goodness-of-fit statistic.
  • df: Same as df given above.
  • p.value: The p-value for the Rao-Scott second-order adjusted Pearson goodness-of-fit test.
lrt.gof.rs is a list containing the following objects:
  • lrt.gof.rs: The Rao-Scott second-order adjusted LRT goodness-of-fit statistic.
  • df: Same as df given above.
  • p.value: The p-value for the Rao-Scott second-order adjusted LRT goodness-of-fit test.
--- For type = "all", the original list includes the boot.results and rs.results output.

Details

The Rao-Scott approach applies a second-order adjustment to the model comparison statistic and its sampling distribution. Formulas are provided in Appendix A of Bilder and Loughin (2007).

The bootstrap approach empirically estimates the sampling distribution of the model comparison statistic. Gange's (1995) method for generating correlated binary data is used for taking resamples under the null hypothesis. Bootstrap results are available only when boot = TRUE in the call to the genloglin function.

References

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.

Gange, S. (1995) Generating multivariate categorical variates using the iterative proportional fitting algorithm. The American Statistician, 49, 134--138.

Examples

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

Run the code above in your browser using DataLab