an_bin: Analyse a binary outcome in a cross-over dataset

Description Usage Arguments Details Value References See Also

View source: R/an_bin.R

Description

Facilitates the analysis of binary outcome data in a cross-over dataset.

Usage

1
2
3
an_bin(data, outcome, method = "glmm", alternative = "two_sided",
  complete_case = T, exact = T, correct = 1, conf_level = 0.95,
  carryover = F, summary = T, ...)

Arguments

data

A tibble of class xover_data.

outcome

The chosen binary outcome variable from data for which the analysis will be performed. Should be stated absolutely, i.e., not as a character string.

method

A character string indicating which method to use for analysis. Must be one of "conditional_logistic", "gee", "glmm", "mainland_gart", "mcnemar", and "prescott".

alternative

character string indicating whether to perform a one- or two-sided test. Must be one of "one_sided" and "two_sided".

complete_case

A logical variable indicating whether to reduce data to its complete case form.

exact

A logical variable indicating whether to use the exact or approximate version of the chosen method.

correct

Only used in the case that method = "mainland_gart", where it determines the type of correction to apply to the test statistic. Should be a single numeric integer between one and four inclusive. See thepackage vignette for further details.

conf_level

The confidence level to use in confidence interval construction. Should be a single numeric strictly between zero and one.

carryover

Only used in the case that method is one of "conditional_logistic", "gee", or "glmm", when it indicates whether carryover effects should be included in the model. Should be a logical variable.

summary

A logical variable indicating whether a summary of the function's progress should be printed to the console. Defaults to T.

...

Additional arguments to pass to elrm in the case that method = "conditional_logistic" and exact = T.

Details

an_bin() supports the analysis of binary outcome data from a cross-over trial. Precisely, a dataset of class xover_data is provided (see data), along with a binary outcome variable within this dataset (see outcome). The value of method, and several other input arguments, then determines the type of analysis performed on the data. At present, the following values of method are supported:

See the package vignette for further dettails.

Note that datasets can be converted to class xover_data using as_xover_data.

Value

A list or class xover_an containing in particular a list test_results describing the results of the chosen test.

References

Jones B, Kenward MG (2014) Design and Analysis of Cross-Over Trials. Chapman and Hall: London, 3rd Edition.

See Also

as_xover_data for converting datasets to class xover_data.


mjg211/xover documentation built on Oct. 16, 2019, 10:46 a.m.