PathSelectMP: Backwards Variable Selection for Paths using M Plus

Primarily for use with datasets containing only categorical variables, although continuous variables may be included as independent variables in paths. Using M Plus, backward variable selection is performed on all Total, Total Indirect, and then Direct effects until none of these effects have p-values greater than the specified target p-value. If there are missing values in the data, imputations are performed using the Mice package. Then selection is performed with the imputed data sets, and results are averaged.

Install the latest version of this package by entering the following in R:
AuthorWilliam Terry, Meredith Ray, Hongmei Zhang
Date of publication2016-05-20 01:16:03
MaintainerWilliam Terry <>
LicenseGPL (>= 2)

View on CRAN

Man pages

AddOnAllInd: Indirect Effect Writer

AddOnINDStatements: Indirect Effect List Creator

AllBackwardSelect: Run Backward Variable Selection in Path Analysis with M Plus

AllSummary: Direct Effects Path Summaries

AllSummary2: Direct Effect Summary

AllTotalEffOutput: Summary of Total Effects

AverageRRs: Calculate Average Risk Ratios over all imputed data sets

CalculatRiskRatios: Calculate Risk Ratios from Direct Effects

CheckVarNames: Variable Name Check

ConvertData2: Converts Necessary Inputs for 'CalculatRiskRatios'

ConvertData3: Used to make multiple list names for imputations

CountImputedEffect: Count and Average Effects for All Imputed Datasets

CreateInitializeMatrix: Create Possible Path Matrix

CreateSummaryMats: Extract and Summarize Direct Effects

CreateSummaryMats2: helper function for 'AddOnAllInd'

CreateTotalEffMat: Summarizes Total Effects

CreateTotalSummary: Summarizes and Averages Total Effects

DatImputations: Impute Data

Initialize: Create Initial Objects

mod: Simple Modular arithmetic

MPlusBackwardSelect: Backward Selection Helper Function

NewBinseqWrap: Possible Combinations of Elements, 1 from each list

NewNamesThresh: Threshold Names

NumCat: Number of Categories

NumEndFile: Extract Number From INP and OUT Files

OnlyNumberElement: indexes list of lists

ParseTotalEffects: Parse Total, Direct, and Indirect Effects

ParseTotalEffects2: Parse and Exctract Total Effects

PathNames: M Plus Path description

PathSelectMP-package: Backwards Variable Selection for paths using M Plus

Simulate: Simulate data set

SpecialMatch: Match and delete elements

TotalRiskRatios: Calculate Risk Ratios for total effects

WriteInitialInpFile: Write Inp File


AddOnAllInd Man page
AddOnINDStatements Man page
AllBackwardSelect Man page
AllSummary Man page
AllSummary2 Man page
AllTotalEffOutput Man page
AverageRRs Man page
CalculatRiskRatios Man page
CheckVarNames Man page
ConvertData2 Man page
ConvertData3 Man page
CountImputedEffect Man page
CreateInitializeMatrix Man page
CreateSummaryMats Man page
CreateSummaryMats2 Man page
CreateTotalEffMat Man page
CreateTotalSummary Man page
DatImputations Man page
Initialize Man page
mod Man page
MPlusBackwardSelect Man page
NewBinseqWrap Man page
NewNamesThresh Man page
NumCat Man page
NumEndFile Man page
OnlyNumberElement Man page
ParseTotalEffects Man page
ParseTotalEffects2 Man page
PathNames Man page
PathSelectMP Man page
PathSelectMP-package Man page
Simulate Man page
SpecialMatch Man page
TotalRiskRatios Man page
WriteInitialInpFile Man page

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.