Skip to content

sospiess/varcomblist

Repository files navigation

varcomblist

Create formatted list of pairwise combinations of variables in Stata

Description

This repository provides the Stata package for the varcomblist command and related material to create a formatted (i.e. affixed and delimited) list of all pairwise combinations of variables in a varlist.
For k variables there will accordingly be k!/{2!(k - 2)!} pairs.

The command allows to specifiy how variables within pairs are delimited/hyphenated as well as how pairs are delimited from one another. In addition, individual variables or pairs as a whole can be prefixed/suffixed as appropriate. Thus varcomblist can be useful, e.g., to create multiple interaction terms for commands not supporting factor variables or to specify multiple (error) covariances in structural equation modelling applications.

To install from within Stata type:

. net from https://github.com/sospiess/varcomblist/
. net install varcomblist

After installing type:

. help varcomblist

to get additional usage information and examples.

Requires

Stata 13 or higher
Dependencies: none

Changelog

Notable changes to this project.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

-/-

[1.0.0] - 2021-11-07

  • first release of varcomblist package with command, help, and certification script

Sven O. Spieß, 7 Nov 2021

About

Stata package to create pairwise combinations of (affixed) variable lists

Topics

Resources

Stars

Watchers

Forks