Sub topic 4
Record a Baseline with a Simple Log
This chapter assumes you have already defined your target habit in specific, observable terms, as covered in the previous chapter. You also need a way to write things down. A notes app, a paper card, or a spreadsheet will do. The Python script near the end is optional and needs basic familiarity with running a script.
Why a baseline comes first
A baseline is a record of how often the habit happens, and in what circumstances, before you try to change anything. Habit reversal training (HRT) treats it as the first real step, because it does three jobs:
- It gives you a reference point. Without one, you cannot tell whether the habit is really decreasing or only feels like it.
- It starts awareness training. Writing down each occurrence forces you to notice it, and noticing is the skill the next chapters build on.
- It shows you the pattern. Most people are wrong about when and where their habit happens. A log replaces guesses with data.
This activity is called self-monitoring. You observe your own behavior and record it as it happens or very soon after.
Reactivity: the log can change the habit
Self-monitoring often changes the behavior being monitored. This effect is called reactivity. Some people see the habit drop during the first week of logging, just because they are paying attention.
Reactivity is useful but it creates a problem for the baseline. If the habit falls during logging, you may think you have a baseline when you are already partway into treatment. Two practical rules help:
- Record for at least one to two weeks before you start the competing response, so you see a stable level and not just the first few days.
- Expect the first days to look different from later ones. Judge the baseline from the later, steadier days.
If your counts fall steadily and stay low, you can keep logging and treat that as a good sign. Do not assume it will last. Early drops from attention alone often fade.
What to record
A useful log is small enough that you will actually keep it. Each row describes one occurrence of the habit, or one urge to do it. The log below uses seven fields.
| Field | What to write | Why it matters |
|---|---|---|
| date, time | When it happened | Shows time-of-day patterns |
| situation | Where you were and what you were doing | Reveals high-risk contexts |
| early_warning | Any sensation or movement just before | Trains you to notice the start |
| urge_0_10 | Strength of the urge, 0 (none) to 10 (very strong) | Tracks whether urges weaken over time |
| caught_early | yes or no | Measures awareness |
| competing_response_used | yes or no | Stays "no" during baseline, then tracks practice |
During the baseline period, the last column will almost always be "no", since you have not learned the response yet. Keep the column anyway so the log format does not change when you begin practice.
A sample log
This is a log for nail biting, saved as habit_log.csv. CSV means comma-separated values, a plain text format that any spreadsheet can open.
date,time,situation,early_warning,urge_0_10,caught_early,competing_response_used
2026-03-02,09:15,reading email,tension in fingers,6,yes,yes
2026-03-02,14:40,video call,none noticed,4,no,no
2026-03-02,21:05,watching TV,hand moves to mouth,7,yes,yesThe sample shows entries where the response was used, as it would look later in treatment. In a true baseline, those cells would read "no".
The second row, "none noticed", is a normal and honest entry. Many people do not feel anything before the habit at first. You are not failing when you cannot name an early warning. Writing "none noticed" is better than inventing one.
How to record
Log close to the moment
Write the entry as soon as you notice the habit, or at least within a few minutes. Memory at the end of the day undercounts, and it blurs the situation details. If you cannot write immediately, make a tally mark on a card and fill in the details later.
Count what you notice, and say so
At first you will miss many occurrences, because habits often run without attention. Your early counts are a floor, not the true number. This is not a flaw in your method. The next chapters on awareness training exist to close that gap, and the count will often rise as you get better at noticing, even if the habit itself is not increasing. Write a note in the log when you see this happen so you do not misread it as getting worse.
Record urges as well as occurrences
An urge is the pull to do the habit, whether or not you act. Logging urges has two benefits. It gives you more data points, and it later lets you see whether urges stay strong when you resist them. Mark urges that you did not act on with the same row format, and say so in the situation field, for example "urge only, did not bite".
Keep the scale consistent
The 0 to 10 urge rating is subjective, so the numbers only compare to your own other ratings. Decide what a 3 and an 8 feel like now and keep to that meaning. A rough anchor helps: 0 is no pull, 5 is a clear pull you could ignore with effort, 10 is the strongest you can imagine.
What the baseline shows you
After one to two weeks you have enough rows to look for patterns. Three questions are worth asking:
- How many occurrences per day, on average, and how much does that vary?
- Which situations appear most often?
- How often did you catch it early?
You can answer these by eye with a small log. If you have many rows, a short script counts them for you.
Optional: count with Python
This script reads habit_log.csv, counts entries per situation to reveal high-risk contexts, and reports how often you caught the habit early. It uses only the standard library.
import csv
from collections import Counter
with open("habit_log.csv", newline="") as f:
rows = list(csv.DictReader(f))
by_situation = Counter(row["situation"] for row in rows)
for situation, count in by_situation.most_common():
print(f"{situation}: {count}")
caught = sum(1 for row in rows if row["caught_early"] == "yes")
print(f"Caught early: {caught} of {len(rows)}")For the sample log above, the output is:
reading email: 1
video call: 1
watching TV: 1
Caught early: 2 of 3Three rows are too few to show a pattern, so the counts are all 1. With two weeks of data, the top lines of this output point at the contexts where the habit clusters.
Common errors in reading the numbers
- Wording differences split counts. "watching TV", "TV" and "tv at night" are three situations to the script. Use the same short phrase each time, or clean the labels before counting.
- Commas break the format. A situation such as "work, at desk" adds a column and shifts the other fields. Avoid commas in free text, or put the field in double quotes.
- A blank or misspelled
caught_earlyvalue is not counted as "yes". The script compares to the exact text "yes", so "Yes" or "y" will be skipped. - Small samples mislead. A situation that tops the list after three days may not be your riskiest one. Wait for the full baseline.
Where the baseline fits
The log connects the earlier and later parts of the plan. It rests on the habit definition, since you cannot count something you have not defined. It feeds awareness training, where you work on describing each occurrence, spotting early warnings, and finding high-risk situations. Later, the same log tracks your use of the competing response, and you compare it with the baseline to see change.
Privacy and honesty
The log is for you, so there is no reason to flatter it. Record occurrences you are embarrassed about as well as the easy ones. If you share the log with a partner, family member, or clinician, decide in advance what you will share and how. A log you fear being judged on tends to get edited, and an edited baseline is not useful.
Checklist before moving on
- You have a log in a format you will keep using.
- You have at least one to two weeks of entries, with the later days steadier than the first.
- You use consistent wording for situations.
- You rate urges on a fixed 0 to 10 scale.
- You can state your average daily count and your top two or three situations.
Exercise
Your log shows 4 occurrences per day in week one, 2 per day in week two, and 6 per day in week three, after you spent a week practicing noticing the habit more carefully. A friend says the habit is getting worse. What are two reasons the numbers could be misleading, and what would you do?
Show answer
First, reactivity: the drop in week two may come from the attention of logging alone, so it may not represent a true baseline. Second, better detection: the rise in week three may come from noticing occurrences you used to miss, so the habit may not have increased. Keep logging, add a note about improved noticing, and judge the baseline from several steady days. Look at the caught_early column and the situations too, since they show whether your awareness has changed.
Exercise
The Python script prints "Caught early: 0 of 12", but your log clearly has several entries where you caught the habit early. What is the most likely cause, and how do you fix it?
Show answer
The script counts only values equal to the exact text "yes". Entries written as "Yes", "y", or "yes " with a trailing space are skipped. Fix the log so every value is exactly "yes" or "no", or change the script to compare row["caught_early"].strip().lower() == "yes".