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.
"anova"(object, model.HA = "saturated", type = "all", gof = TRUE, print.status = TRUE, ...)
'genloglin'
produced by the genloglin
function.
"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.
"boot"
specifies a bootstrapping procedure; "rs2"
specifies a Rao-Scott second-order adjustment; "all"
specifies both approaches.
model.HA = "saturated"
, model comparison statistics and goodness-of-fit statistics are identical, so only one set of statistics is presented.
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.
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.
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.
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.
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.
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.
type = "all"
, the original list includes the boot.results
and rs.results
output.
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.
Gange, S. (1995) Generating multivariate categorical variates using the iterative proportional fitting algorithm. The American Statistician, 49, 134--138.
## For examples see help(genloglin).
Run the code above in your browser using DataLab