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 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.
The data are not stored in the computer's memory until you have pressed the Enter key, or have moved the cell pointer to another 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.
See also: How to enter dates
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 select the command Save as in 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 select the Save command in the File menu to save your data under the same file name.
If you do not save your data on the disk, your work will be lost when:
- you exit the program
- switch of the computer
- there is a power failure or a system or hardware malfunction.
The program automatically formats the numbers that you enter according to the number of decimals selected in the Format spreadsheet dialog box.
If you want a different number of decimals for a particular column, then select Spreadsheet in 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 only contains text data (option "Text format"). The latter option is particularly useful when the column contains text data that should not be interpreted as a number, e.g. dates: 05/07/1956 must be displayed as such, not as 0.0003652
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.