{
  "name": "xtset time-unit options in Stata: format and zero point",
  "description": "Compiled from Stata's help page for xtset: each unit option that tells xtset how to interpret the time variable, the %t display format it applies, and the value that corresponds to zero (or the example given). Reordered into one lookup table for choosing the option.",
  "page": "https://casrai.org/guides/xtset-stata",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-18T00:46:16Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "xtset unit option",
      "unit": "",
      "description": ""
    },
    {
      "name": "Time variable format",
      "unit": "",
      "description": ""
    },
    {
      "name": "Zero point or note",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "xtset unit option": "clocktime",
      "Time variable format": "%tc",
      "Zero point or note": "Milliseconds from 1jan1960 00:00:00.000"
    },
    {
      "xtset unit option": "daily",
      "Time variable format": "%td",
      "Zero point or note": "0 = 1jan1960"
    },
    {
      "xtset unit option": "weekly",
      "Time variable format": "%tw",
      "Zero point or note": "0 = 1960w1"
    },
    {
      "xtset unit option": "monthly",
      "Time variable format": "%tm",
      "Zero point or note": "0 = 1960m1"
    },
    {
      "xtset unit option": "quarterly",
      "Time variable format": "%tq",
      "Zero point or note": "0 = 1960q1"
    },
    {
      "xtset unit option": "halfyearly",
      "Time variable format": "%th",
      "Zero point or note": "0 = 1960h1"
    },
    {
      "xtset unit option": "yearly",
      "Time variable format": "%ty",
      "Zero point or note": "1960 = 1960"
    },
    {
      "xtset unit option": "generic",
      "Time variable format": "%tg",
      "Zero point or note": "Unnamed generic units"
    }
  ],
  "sources": [
    {
      "title": "StataCorp: help xtset",
      "url": "https://www.stata.com/help.cgi?xtset",
      "accessed": "2026-11-17"
    }
  ]
}