Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • tsspell to count only workdays?

    Hi, I'm trying to generate spells in Stata for an HR type of database. I want to count periods of absence from work, and I want to categorize absences between short term (let's say less than 11 days) and long term absences (11 days or longer). BUT, I want to only count workdays. Any advice on how to accomplish that? Is there an option that I'm missing that I could use with tsspell?
    IF that were possible, would it be also possible to specify holidays?
    Thanks!

  • #2
    tsspell is from SSC.

    I think you need a business calendar. There is no special switch in tsspell for what you want. Rather, it's the responsibility of the user to tsset according to whatever makes sense. So the machinery you need exists outside tsspell.

    Comment


    • #3
      Thanks, Nick. Let me see if I understand what you mean: I need to create/define the business calendar according to the business I'm analyzing, format my dates accordingly, and once I've done that, tsspell will calculate the spells counting only what's specified in the business calendar?

      Comment


      • #4
        That's my expectation. I've never done it, but I understand that it is essentially what a business calendar offers, that the clock is stopped when business does.

        Otherwise put, if it turns out that tsspell has an hidden assumption that a business calendar is not in use, then that's a limitation of tsspell that becomes a problem for the programmer, who as you may have noticed is myself.

        Comment

        Working...
        X