How to enter data
Data for the different variables are entered in different columns of the spreadsheet. All data for a single subject or case are entered in one row in the spreadsheet. In the top row of the columns you can enter the names of the variables.
- A variable name should not include any spaces. If necessary, you can use the underscore character _ to separate words, e.g. GRADE_A. Also the following characters cannot be used in a variable's name:
- + / * = < > # & @ $ | ^ : , ; . ( ) ' " [ ] { }
- In addition, the variable name must not be a number, not start with a number and must be different from reserved words such as TRUE, FALSE, ROW and COLUMN.
- The variable name should also not be equal to the address of a spreadsheet cell such as A1, S1, AB35, IL6, etc.
To to enter the variable name LENGTH in the top row of column A, you first position the mouse pointer on this cell, and click the left mouse button. The cell pointer is now located in this cell, and you can type the variable's name on the keyboard. Next, you press the key to actually store the name in the computer's memory and move the cell pointer to cell A1. You can now enter the first value 171 for the variable LENGTH in this cell, followed by pressing the key to go to the next cell.
Change the contents of a cell
When you want to change or edit the content of a cell, place the cell pointer on this cell and press function key F2. You can now move the cursor in the cell's text by means of the arrow keys and , and make the necessary changes. After you have made the changes, press the Enter key or move the cell pointer to another cell to store the new cell content in memory.
Save your data
While you are entering data you must, from time to time, save your data on the disk. When you save the file for the first time then click Save as on the File menu, and next enter the file name in the file selector box described elsewhere. After you have given a name to your data file, you can click Save on the File menu to save your data under the same file name.
Formatting the data
The program automatically formats the numbers that you enter according to the number of decimals selected in the Format spreadsheet dialog box.
The image above shows rational numbers in which a dot is used as decimal symbol (e.g., 75.5). In most European countries, a comma is used as decimal symbol, and the number 75.5 is displayed as 75,5.
The decimal symbol is an option in the Windows control panel and MedCalc uses this setting by default. This behavior is the same as in for example Excel.
You can however change the decimal symbol used by MedCalc in the Options panel (Regional settings tab).
If you want a different number of decimals for a particular column, then click Spreadsheet on the Format menu and enter the new number of decimals on the Column tab. In this dialog box you can also specify a different width for the column. You can also specify that a particular column contains text, dates, or time data (option "Text format").
Variables
A variable may either be categorical or numerical. Categorical variables may either consist of numeric or alphanumeric (string) data. A numerical variable always consists of numerical data.
Categorical or qualitative variable
Categorical or qualitative data may either be entered as numbers or as text strings. A text string consists of one or more alphanumeric characters, placed in quotation marks. The program will consider every expression that cannot be interpreted as a number to be a string, even if it is not placed between quotation marks, e.g. "Green", yellow, "10". Distinction can be made between Nominal and Ordinal data:
- Nominal data: a classification without obvious order, e.g. blood group, male/female.
- Ordinal data: ordered categorical data, e.g. endometriosis stage, varicocele grade.
A variable that can only have 2 values is also called a dichotomous variable, for example pregnant/not pregnant, male/female.
In MedCalc, it is often useful to code categorical data with numerical values: 0 and 1, or 1 2 3 4, etc.
Numerical or quantitative variable
A numerical variable consists of numbers, for example 0, 25 or 3.258, or expressions that can be interpreted as a number, e.g. LOG(25) or SQRT(VAR1) where VAR1 is a variable's name containing numerical data.
Numerical data may either be continuous or discrete.
Continuous data: numbers that can theoretically assume any value between two given values; usually measurements, for example: the height of a person.
Discrete data: data that are not continuous (and may have a limited number of values), usually counts, for example: the number of children in a family.
You can easily convert a numerical variable into a categorical variable using the spreadsheet function CATEGORISE or IF (If-then-else function).