glm_lr_bw: Backward selection of Logistic regression models in multiply...

View source: R/glm_lr_bw.R

glm_lr_bwR Documentation

Backward selection of Logistic regression models in multiply imputed data.

Description

glm_lr_bw Backward selection of Logistic regression models in multiply imputed data using selection methods RR, D1, D2, D3 and MPR. Function is called by glm_mi.

Usage

glm_lr_bw(data, nimp, impvar, Outcome, P, p.crit, method, keep.P)

Arguments

data

Data frame with stacked multiple imputed datasets. The original dataset that contains missing values must be excluded from the dataset. The imputed datasets must be distinguished by an imputation variable, specified under impvar, and starting by 1.

nimp

A numerical scalar. Number of imputed datasets. Default is 5.

impvar

A character vector. Name of the variable that distinguishes the imputed datasets.

Outcome

Character vector containing the name of the outcome variable.

P

Character vector with the names of the predictor variables. At least one predictor variable has to be defined. Give predictors unique names and do not use predictor name combinations with numbers as, age2, BMI10, etc.

p.crit

A numerical scalar. P-value selection criterium. A value of 1 provides the pooled model without selection.

method

A character vector to indicate the pooling method for p-values to pool the total model or used during predictor selection. This can be "RR", D1", "D2", "D3" or "MPR". See details for more information. Default is "RR".

keep.P

A single string or a vector of strings including the variables that are forced in the model during predictor selection. All type of variables are allowed.

Author(s)

Martijn Heymans, 2021


miceafter documentation built on Oct. 2, 2022, 5:08 p.m.