CLIP.confint.difflevel {nncc}R Documentation

Combine confidence interval for logistf after multiple imputation

Description

The function was modified from [CLIP.confint](https://CRAN.R-project.org/package=logistf/index.html]) to combine results from m imputed data sets that have different structures (e.g., a covariate in a model have different levels across different imputed data sets) on April 15, 2022.

Usage

CLIP.confint.difflevel(
  obj = NULL,
  variable = NULL,
  data,
  firth = TRUE,
  weightvar = NULL,
  control = logistf.control(),
  ci.level = c(0.025, 0.975),
  pvalue = TRUE,
  offset = NULL,
  bound.lo = NULL,
  bound.up = NULL,
  legacy = FALSE
)

Arguments

obj

Either a list of logistf fits (on multiple imputed data sets), or the result of analysis of a mice (multiply imputed) object using with.mids

variable

Must be used to include variables of interest; each of variable of interest must have the same levels across different imputed data sets.

data

A list of data set corresponding to the model fits. Can be left blank if obj was obtained with the dataout=TRUE option or if obj was obtained by mice

firth

If TRUE, applies the Firth correction. Should correspond to the entry in obj.

weightvar

An optional weighting variable for each observation.

control

Control parameters for logistf, usually obtained by logistf.control()

ci.level

The two confidence levels for each tail of the posterior distribution.

pvalue

If TRUE, will also compute a P-value from the posterior.

offset

An optional offset variable

bound.lo

Bounds (vector of length 2) for the lower limit. Can be left blank. Use only if problems are encountered.

bound.up

Bounds (vector of length 2) for the upper limit. Can be left blank. Use only if problems are encountered.

legacy

If TRUE, will use pure R code for all model fitting. Can be slow. Not recommended.

Details

The formula in [logistf](https://CRAN.R-project.org/package=logistf/index.html]) must be written as variable of interest followed by covariates that have different levels across different imputed data sets.

For more information, please refer to the vignette using browseVignettes("nncc") and the original function [CLIP.confint](https://CRAN.R-project.org/package=logistf/index.html]).

Please cite the original function [CLIP.confint](https://CRAN.R-project.org/package=logistf/index.html]) for publication.

Value

An object of class CLIP.confint, with items:

variable

The variable(s) which were analyzed

estimate

The pooled estimate (average over imputations)

ci

The confidence interval(s)

pvalue

The p-value(s)

imputations

The number of imputed datasets

ci.level

The confidence level (input)

bound.lo

The bounds used for finding the lower confidence limit; usually not of interest. May be useful for error-tracing.

bound.up

The bounds used for finding the upper confidence limit

iter

The number of iterations (for each variable and each tail)

call

The call object


[Package nncc version 1.0.1 Index]