Announcement

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

  • jwdid with Tobit models

    Hi everyone,

    I’m trying to use jwdid package with tobit regressions but keep getting the error:

    "option cluster() not allowed".

    Below is the command I'm using:

    jwdid y, ivar(id) tvar(year) gvar(first_treat) method(tobit) never ll(0) ul(1)

    I have tried different variations of it, but the error persists. As of now, I'm coding my regressions manually (based on the excellent ado files created by Fernando Rios-Avila), but it would be much easier if I could make this work with jwdid. Any advice on workarounds?


    Many thanks in advance!

    Thiago

  • #2
    I think it is an issue with your Stata version.
    If you download the latest version of jwdid, you could...drop cluster() from the ado file
    and then add the option vce(cluster id) instead directly on the jwdid command
    I ll try to send an example later today

    Comment


    • #3
      You sure the code can handle Tobit? I looks like it may be interpreting the boundaries as a cluster option.

      might "set trace on" to see where it's bugging out on you.
      Last edited by George Ford; 08 Jan 2025, 11:31.

      Comment


      • #4
        Thank you both for your quick replies!

        Fernando: I am using Stata17 (up-to-date) and the version "*!v2.00 Paper Out" of jwdid. I don't have any other version of the ado file on my computer.
        After checking the ado file, I believe excluding `tocluster' from the regressions (specifically, from the one below) should do the trick, correct?

        `method' `y' `xvar' `x' `ogxvar' `otxvar' `xcorr' `exogvar' i.`gvar' i.`tvar' ///
        if `touse' [`weight'`exp'], `tocluster' `method_option' `options'

        George: Thank you for your suggestions. If I understand correctly, the error occurs after Stata starts running gsem_parse_gauss_args.parsei (see page 185 of the attached pdf file with the results). I have to admit I'm not familiar with what that means.

        Looking forward to hearing your thoughts, and thank you again for your help!
        Attached Files

        Comment


        • #5
          Honestly, you should probably code it yourself. JWDID is fairly straightforward. Whether or not it is valid with Tobit I do not know, but Fernando didn't blink and he'd know better than I.

          Comment

          Working...
          X