abcd: Acyclic Behavior Change Diagram

Description Usage Arguments Details Value Author(s) References Examples

Description

This function generates an acyclic behavior change diagram (ABCD) from a specification in a google sheet or .csv file. An ABCD is a logic model that illustrates the assumptions underlying a behavior change intervention. Specifically, the ABCD shows the assumed causal and structural assumptions, thereby showing what is assumed to cause what (e.g. which elements of the intervention are assumed to influence which aspects of the target population's psychology?) and what is assumed to consist of what (e.g. which determinants are assumed to contain which specific aspects of the target population's psychology?).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
abcd(specs, specCols = c("bcps", "cnds", "apps", "sdts", "dets", "pobs",
  "behs"), omitColOrder = c("cnds", "behs", "bcps", "apps"),
  localBackup = NULL, title = "Acyclic Behavior Change Diagram\n\n",
  outputFile = NULL, outputWidth = 3000, outputHeight = 1500,
  includeColNames = TRUE, maxLabelLength = 30, silent = FALSE,
  returnGraphOnly = FALSE,
  regExReplacements = list(c("\\\"", "`"), c("\\'", "`"), c("\\\\", "/")))

## S3 method for class 'abcdiagram'
print(x, width = x$input$width,
  height = x$input$height,
  title = DiagrammeR::get_graph_name(x$output$graph), ...)

Arguments

specs

The specifications: either a google sheets URL, the path to a local file, a character vector with both, or a matrix or data frame

specCols

The order of the columns. This character vector specified the order of the elements of an ABCD. In the default order, from left to right, these are (see below for definitions and more details):

  • bcps = Behavior Change Principles (BCPs);

  • cnds = Conditions for effectiveness;

  • apps = Applications;

  • sdts = Sub-determinants;

  • dets = Determinants;

  • pobs = Performance Objectives;

  • behs = Behaviors;

omitColOrder

If not all seven columns are available in the specifications, this character vector specifies which columns are assumed to be omitted.

localBackup

Whether to write the specifications to a local backup

title

The title of the diagram

outputFile

If specified, the ABCD is written to this file using DiagrammeR::export_graph.

outputWidth, outputHeight

If an outputFile is specified, these determine its width and height (in pixels)

includeColNames

Whether to include the column names as titles/legend for the entities in each 'column' of the ABCD.

maxLabelLength

At which width to word wrap the labels.

silent

Whether to suppress (TRUE) or show (FALSE) more detailed information.

returnGraphOnly

Whether to return the full results object or only the DiagrammeR::DiagrammeR graph.

regExReplacements

A list of pairs of regular expressions that will be applied to the specifications before generating the ABCD. This can be used to sanitize problematic characters (e.g. ', " and ).

x

The ABCD object to print (as generated by a call to abcd).

width, height

Width and height to use when printing the ABCD.

...

Any additional arguments are passed on to DiagrammeR::render_graph().

Details

Specifically, a full ABCD is a model that shows the following elements:

For details, see Peters et al. (2019).

Value

A list consisting of an input, intermediate, and output list, where the ABCD is stored in the output list as a DiagrammeR::DiagrammeR called graph.

Author(s)

Gjalt-Jorn Peters, gjalt-jorn@a-bc.eu, with contributions from Matti Heino and Sander Eggers.

References

Crutzen, R., & Peters, G.-J. Y. (2018). Evolutionary learning processes as the foundation for behaviour change. Health Psychology Review, 12(1), 43–57. https://doi.org/10.1080/17437199.2017.1362569

Kok, G. (2014). A practical guide to effective behavior change: How to apply theory- and evidence-based behavior change methods in an intervention. European Health Psychologist, 16(5), 156–170. https://doi.org/10.31234/osf.io/r78wh

Kok, G., Gottlieb, N. H., Peters, G.-J. Y., Mullen, P. D., Parcel, G. S., Ruiter, R. A. C., … Bartholomew, L. K. (2016). A taxonomy of behavior change methods: an Intervention Mapping approach. Health Psychology Review, 10(3), 297–312. https://doi.org/10.1080/17437199.2015.1077155

Peters, G.-J. Y., et al. (2019) The core of behavior change: introducing the Acyclic Behavior Change Diagram to report and analyze interventions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
### Using 'print' to prevent pkgdown() from choking
### Partial acyclic behavior change diagram of only
### one performance objective (sub-behavior)
### (using the 'abcd_specs_single_po_without_conditions'
###  dataset in this package)
print(behaviorchange::abcd(behaviorchange::abcd_specs_single_po_without_conditions));

### Acyclic behavior change diagram including multiple
### sub-behaviors (performance objectives)
### (using the 'abcd_specs_complete' dataset in this
###  package)
print(behaviorchange::abcd(behaviorchange::abcd_specs_complete));

academy-of-behavior-change/behaviorchange documentation built on May 12, 2019, 4:35 a.m.