0
$\begingroup$

Please tell me how to enter my samples in excel can I first enter cases then controls in same sheet? What about match ID and group indicator?

$\endgroup$
1
$\begingroup$

There is no real wrong way to enter data, as you can always manipulate your data and rearrange it in statistical software like R. That said, to avoid errors from confusion and headaches from remembering what's what, here is what I suggest:

A convenient way is by starting with a row that represents the column names. Every next row then represents a single observation of all recorded variables. For example, using the variables you mentioned:

matchID | group | status  | ... 
1       | A     | case    | ...
2       | A     | control | ...
3       | A     | case    | ...
...     | ...   | ...     | ...
1000    | B     | control | ...

The order in which you enter the observations is not so important.

If you have repeated measures of the same individuals or experimental units, you can still use this format by simply creating new rows where matchID repeats:

matchID | group | status  | time | ... 
1       | A     | case    | 1    | ...
2       | A     | control | 1    | ...
3       | A     | case    | 1    | ...
...     | ...   | ...     | ...  | ...
1000    | B     | control | 1    | ...
1       | A     | case    | 2    | ...
2       | A     | control | 2    | ...
3       | A     | case    | 2    | ...
...     | ...   | ...     | ...  | ...
1000    | B     | control | 2    | ...

Make sure to use informative variable names, so that both you and others can understand what represents what, even if some time passes between data collection and analysis. Try to avoid using special characters (!@#$%^&*()[]{}/\:;'",.<>) and spaces, because these may have meaning in the statistical software you end up using.

Abbreviations like temp for temperature, and conc for concentration are fine, but make sure the abbreviations are still recognizable without a glossary.

If you must use more than a single word or abbreviation to describe your variable in an unambiguous way, there are two naming conventions that I would consider good:

  • Capitalize each word (or each word after the first), like MatchID or matchID;
  • Underscores as spaces, like match_ID.

Of course, try to keep your column names short. If every patient has but a single identifier, you can drop match altogether and just name the first variable ID, or patient.


Finally, since you mention using Excel specifically, avoid the following:

  • Graphs in the middle of a page with raw data;
  • Coloring;
  • Multiple data sets arranged side-by-side.

Whether it be yourself or someone else, the moment you want to use your data in a different program than Excel, these features most likely will not transfer well. If you like using these features, you can instead:

  • Create a graph on a different tab;
  • Work with coloring in a copy of your raw data (in another tab or file);
  • Create separate files or at least tabs for separate data frames.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.