New variable functionality: Functions for variable calculations

 by  Trond Pedersen

Microdata.no has now been expanded with a number of new functions that can be used to make various calculations of records / rows. This automates and makes it easier to generate variables based on different calculations:

Row function Calculation (arguments can be variables or numbers)
rowconcat Linking the arguments of the given unit (string / alphanumeric)
rowmax The maximum value among the arguments for the given unit
rowmin The minimum value among the arguments for the given unit
rowmean The average value among the arguments for the given unit
rowmedian The median value among the arguments for the given unit
rowmissing Number of missing values among the arguments for the given unit
rowstd The standard deviation of the arguments for the given unit
rowtotal The total sum of the arguments for the given unit
rowvalid Number of valid values among the arguments for the given unit

Example of obtaining maximum salary per individual measured over a given number of years:

generate maxsalary = rowmax (salary16, salary17, salary18, salary19)

For more details, we recommend to use the help-function command, e.g. help-function rowconcat

Click here for examples on using row functions

We work continuously to improve microdata.no so that most analysis needs can be met. Thus, more and more analysis options will be introduced. We are based on input from researchers, and have compiled a list of new tools that we work through. Do you have specific suggestions for new functionality? Feel free to contact us by email: support@microdata.no