Table of Contents

vmp.ComputeFormula

Motivation

It is often helpful to combine the maps from a VMP in various ways (e.g. to create a conjunction map). This method allows various combination options.

Method reference ('vmp.Help('ComputeFormula')')

 VMP::ComputeFormula  - add a conjunction map to a VMP
 
 FORMAT:       [vmp] = vmp.ComputeFormula(formula [, opts])
 
 Input fields:
 
       formula     string giving a formula, supporting the following
                   #i -> .Map(i).VMPData
                   $i -> .Map(opts.mapsel(i)).VMPData
                   whereas i can be a single number, or a valid range
                   using the i1:i2 or i1:s:i2 format
       opts        optional settings
       .mapsel     sub-selection of maps (for enhanced indexing)
       .name       set target map name to name
       .pvalues    flag, if true, convert maps to pvalues
       .source     map used as template, default first map encountered
       .target     specify a target map index (otherwise added at end)
                   - additionally all other Map. subfields are accepted
 
 Output fields:
 
       vmp         VMP with added/replaced map

Formula

The formula argument has be passed as a single string which is parsed for occurrences of # and $ characters followed by either a single number (e.g. #4), plain vectors (e.g. $5:8), or non-1-step vectors (#1:12:120). These patterns are expanded to obj.Map(NUMBER).VMPData for single numbers and cat(4, obj.Map(VECTOR).VMPData) for vectors. This means that for any multi-map functions, the 4th dimension must be used!

Options

The most important and possibly non-intuitive option is the .pvalues option. If set to true, the values (VMPData) will be passed to the according distribution function (e.g. sdist('tinv', VMPData, DF1)) prior to going into the formula. This is useful to compute conjunctions (and transparently supported by the main UI's compute formula button for VMPs).

Usage examples