Analysis Definition

.a.yaml files

the analysis definition is a yaml file in the jamovi/ directory, with the extension .a.yaml. the analysis definition describes the analysis, the way it appears in menus, and the options it requires. the file is named to match the name of the analysis it describes, but converted to lowercase. an example is ttestis.a.yaml:

---
name:  TTestIS
title: Independent Samples T-Test
menuGroup: T-Tests
version: '1.0.0'
jas: '1.0'

options:
    - name: ...
      type: ...
    - name: ...
      type: ...
propertyfunction
namethe name of the analysis. camel case. underscores are discouraged, dots are verboten.
titlethe title of the analysis in title case.
versionthe version of the analysis. should make use of semantic versioning.
jasthe jamovi analysis spec. should be ‘1.0’. must be wrapped in quotes to prevent it being interpretted as a number.
menuGroupthe name of the top level menu where the analysis should appear.
menuSubgroup(optional) places the menu entry under a subheading.
menuTitle(optional) the title to be used in the menu. if unspecified, then the title is used.
menuSubtitle(optional) additional text placed to the lower right of the menu entry.
optionsan array of options that the analysis requires. these are described in greater detail below.

Options

options represent the options that an analysis requires in order to run. when a jamovi module is used as an R package, they represent the arguments to the function. when used in jamovi itself, they represent the user interface (UI) options presented to the user.

each option has a name, a type, and some additional properties which are described in greater detail below.

when a value is specified by the user (either through the jamovi user interface, or through a function argument), the option checks the value and produces an error if the value is not suitable. the checks performed by each option are also detailed below.

the different option types are as follows:

Data

Data is used for analyses which require data (almost all of them). if used, it should be the first of the options, and should always be called data. it has no additional properties.

example

    - name: data
      type: Data

Bool

Bool is used for true/false values, and is typically represented in the UI as a checkbox.

properties

example

    - name: bf
      type: Bool
      title: Bayes factor
      default: false

checks

Integer

Integer is used for values which need to be whole numbers. For ‘floating point’ numbers, use Number instead.

properties

checks

Number

Number is used for values which need to be numeric. For whole numbers, use Integer instead.

properties

example

    - name: ciWidth
      type: Number
      title: Confidence level
      min: 50
      max: 99.9
      default: 95

checks

List

List is used where only one of several values may be specified, and only one at a time. In the UI, these are typically represented as either a listbox, or a set of radio buttons.

properties

options must be specified as an array of strings

checks

Variable

Variable is used where a variable/column from the data set needs to be specified. In the UI, these are typically represented as a ‘drop box’, where variables can be dragged and dropped.

The value of Variable is a string (in R, a character vector of length 1) containing the assigned variable name. If nothing is assigned it has a value of null.

checks

Variables

Variables is used where multiple variables/columns from the data set need to be specified. In the UI, these are typically represented as a ‘drop box’, where variables can be dragged and dropped.

The value is an array of strings (in R, a character vector). If nothing is assigned to Variables it’s value is an empty array (in R, a character vector of length 0).

checks