Autor da secção: Laiton Hedley
⚡ List of Functions
Below is a list of functions available in jamovi. These functions can be used in the formula editor to create new variables, filter data, and perform a variety of transformations on existing data.
Function |
Description |
|
|---|---|---|
MATH FUNCTIONS |
||
|
Absolute value: Returns the absolute value in a column of data. |
|
|
Exponential: raises e to the power of each value in a column of data. |
|
|
Natural logarithm (base e): the natural logarithm (base e) of each value in a column of data. |
|
|
Log base 10: the logarithm (base 10) of each value in a column of data. |
|
|
Square root: the square root of each value in a column of data. |
|
STATISTICAL FUNCTIONS |
||
|
Absolute deviation from the median: measures the average absolute deviation of values from the median. Convenience short-hand for |
|
|
Absolute z-score: Convenience short-hand for |
|
|
Box Cox: Returns a Box Cox transformation of the variable. |
|
|
Ceiling: returns the smallest integer that is greater than or equal to each value in a column of numbers, effectively rounding up to the nearest whole number. |
|
|
Floor: returns the greatest integer that is less than each value in a column of numbers, effectively rounding down to the nearest whole number. |
|
|
Interquartile Range: Returns values of 0 to indicate a number is within the box of a boxplot and values larger than 1.5 to indicate the number is outside the whiskers. |
|
MAX(var)MAX(var_1, var_2, ...)VMAX(var)VMAX(var, group_by = other_var) |
Maximum: identifies the highest value in a row or column of data. |
|
|
Maximum Absolute Interquartile Range: Convenience short-hand for |
|
|
Maximum Absolute Z-Score: Convenience short-hand for |
|
MEAN(var)MEAN(var_1, var_2, ...)VMEAN(var)VMEAN(var, group_by = other_var) |
Mean: Calculate the mean score across a row or column of data. |
|
MIN(var)MIN(var_1, var_2, ...)VMIN(var)VMIN(var, group_by = other_var) |
Minimum: identifies the lowest value in a row or column of data. |
|
|
Ranking: assigns an ordinal rank to each value in a column of data. |
|
|
Rounding: adjusts each value in a column of data to a specified number of decimal places or to the nearest whole number. |
|
|
Scale: Returns the normalized values of a set of numbers - synonym for |
|
STDEV(var)STDEV(var_1, var_2, ...)VSTDEV(var)VSTDEV(var, group_by = other_var) |
Standard deviation: measures the amount of standard deviation in a row or column of data. |
|
SUM(var)SUM(var_1, var_2, ...)VSUM(var)VSUM(var, group_by = other_var) |
Summation: Returns the sum of a row or column of data. |
|
VMAD(var)VMAD(var, group_by = other_var) |
Median Absolute Deviation: Returns the median absolute deviation of a variable. |
|
VMADR(var)VMADR(var, group_by = other_var) |
Robust Median Absolute Deviation: Returns the robust median absolute deviation of a variable. |
|
VMED(var)VMED(var, group_by = other_var) |
Median: Returns the median of a variable. |
|
VMODE(var)VMODE(var, group_by = other_var) |
Mode: Returns the most common value, or mode, in a variable. |
|
VN(var)VN(var, group_by = other_var) |
Sample Size (or n): Returns the number of cases in a variable. |
|
VSE(var)VSE(var, group_by = other_var) |
Standard Error: Returns the standard error of a variable. |
|
VAR(var)VVAR(var)VVAR(var, group_by = other_var) |
Variance: Returns the variance of a row or column of data. |
|
|
Z-score: Returns the normalized values of a set of numbers. |
|
LOGICAL FUNCTIONS |
||
|
If the expression resolves true, use the value, otherwise the else. |
|
|
When the variable contains a missing value, use the value, otherwise the else. |
|
|
Inverts a boolean value: true (1) becomes false (0), false (0) becomes true (1). |
|
TEXT FUNCTIONS |
||
|
Determines if specificied string of text (i.e. “needle”) appears in the variable (i.e. haystack) and can be expanded to look for multiple strings across one or more variables: |
|
|
Splits a string of text in a variable by a specified character (or string of text) and returns only the text at the specified position. For example, the string ParticipantbyP01 using |
|
|
Converts values to text format (numbers to strings of text). |
|
|
Converts text (strings) to values (if possible). |
|
DATE/TIME FUNCTIONS |
||
|
Takes a date in text format (i.e. 2000-12-20) and converts to the number of days since the 1st of January, 1970. |
|
|
Takes a number representing the number of days since the 1st of January 1970, and produces a formatted date. |
|
REFERENCE FUNCTIONS |
||
|
Returns the values in the rows, specified by index, from the provided variables. |
|
|
Returns the row index of the variable of interest that matches the value provided. |
|
MISC. FUNCTIONS |
||
|
Counts the number of non-missing values. |
|
|
Filters a variable using a filter expression. For example, |
|
|
Converts a number to an integer (a positive or negative number without a fractional component). |
|
|
Offsets a column of data up or down by +/- n rows |
|
|
Returns a column with each row indicating the row number. |
|
|
Draws a random sample of n values from a variable. |
|
|
Returns the number of rows of a variable. |
|
SIMULATION FUNCTIONS |
||
|
Draws samples from a Beta distribution, using the parameters alpha (proportional successes) and beta (proportional failures). |
|
|
Draws samples from a Gamma distribution, using the parameters shape (skewness) and scale (spread of data). |
|
|
Draws samples from a Normal (Gaussian) distribution, using the mean (center of the distribution) and standard deviation (spread of the distribution). |
|
|
Draws samples from a Uniform distribution, providing a minimum value and a maximum value. |
Understanding Formulas
In jamovi formulas are constructed using a combination of numbers, variables, values, operators and functions.
Numbers are simply numbers (i.e. 1, 2.5, -3), adding two numbers together performs arithmetic (i.e. 2 + 2 = 4). Variables are referred to by their name (i.e. variable_name) and can be referred to with backticks as well (i.e. `variable name`) - when the variable name contains spaces it is a requirement to use backticks otherwise jamovi will not be able to interpret the formula correctly.
Often we use strings of text in our rows of data to indicate categories or conditions. In jamovi, adding two text values together performs concatenation or rather joins them together (i.e. hello + world = helloworld). Adding numbers and strings of text together, again performs concatenation where by the number is converted to text alogside the string of text (i.e. 2 + apples = 2apples). Values surrounded by ticks are strings of text (i.e. '10').
When using formulas often we may wish to use
andandorwhen performing are logical operations (i.e.IF(var_1 > 5 and var_2 < 10, 'Yes', 'No')andIF(var_1 == 'A' or var_2 == 'B', 'Match', 'No Match')).