Announcement

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

  • clustered standard errors in double selection lasso causes error (dslogit, vce(cluster clustervar))

    Dear Statalist-users,

    I´m using Stata 16.1.
    In my analysis I want to cluster standard errors at the individual level using double-selection lasso logistic regression.
    My code is:

    Code:
    dslogit depvar controls, controls($myvarlistinf) rseed(123) lasso(*, selection(cv)) vce(cluster clustervar)
    I receive the following error:
    vcetype 'cluster' not allowed
    r(198);


    In the stata lasso reference manual - release 17, this vce type is allowed. In the help of Stata 16.1, it is not. Is it now simply the case, that it does not work with Stata 16.1 or am I missing an error in my code?

    Thanks a lot!
    Cheers
    Franziska

    Last edited by Franziska Bras; 24 Nov 2021, 02:49.

  • #2
    Franziska:
    welcome to this forum.
    As per Stata 16.1 -help dslogit-:
    SE/Robust
    vce(vcetype) vcetype may be robust (the default) or oim
    Hence, -vce(cluster clusterid)- option for -dslogit- standard errors is simply not available in Stata 16.1.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,

      that was what I suspected, but I thought I'd ask just to be on the safe side :-)

      Thank you very much for your kind reply!

      Best
      Franziska

      Comment

      Working...
      X