Announcement

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

  • Please help! sttocc does not work in stata ver 17.0

    Best everyone

    I am trying to create a nested case-control using sttocc. I bought stata ver 17.0 a few days ago. I ran sttocc with this, and it comes out as follows- error messages. What should I do? Even after updating, it doesn't work. The syntax below is a direct copy of the sttocc example (https://www.stata.com/manuals/ststtocc.pdf). please tell me the solution!!!

    Best regards



    -----------------------------------------------------------

    use https://www.stata-press.com/data/r17/diet (Diet data with dates)

    stset dox, failure(fail) enter(time doe) id(id) origin(time dob) scale(365.25)

    Survival-time data settings

    ID variable: id
    Failure event: fail!=0 & fail<.
    Observed time interval: (dox[_n-1], dox]
    Enter on or after: time doe
    Exit on or before: failure
    Time for analysis: (time-origin)/365.25
    Origin: time dob

    --------------------------------------------------------------------------
    337 total observations
    0 exclusions
    --------------------------------------------------------------------------
    337 observations remaining, representing
    337 subjects
    80 failures in single-failure-per-subject data
    4,603.669 total analysis time at risk and under observation

    At risk from t = 0
    Earliest observed entry t = 30.07529
    Last observed exit t = 69.99863 .

    set seed 9123456 .
    sttocc, match(job) n(5) nodots

    Data are st/Stata 6 and not st/Stata 5. You are running the old Stata 5 version of st. We provide it so that researchers may reproduce old analyses. If you do not mean to be running the old system, type . version 6 if you do mean to be running the old system, type . version 5 stset ... fill in the dots with old syntax) When you are done, type . version 6
    r(119);
    Last edited by Sunyoung Cho; 03 Jun 2021, 07:02.

  • #2
    Using Stata 15.1, I encountered no problems in running the preceding code:

    Code:
    use https://www.stata-press.com/data/r17/diet
    stset dox, failure(fail) enter(time doe) id(id) origin(time dob) scale(365.25)
    set seed 9123456
    sttocc, match(job) n(5) nodots

    Comment


    • #3
      Originally posted by Mike Lacy View Post
      Using Stata 15.1, I encountered no problems in running the preceding code:

      Code:
      use https://www.stata-press.com/data/r17/diet
      stset dox, failure(fail) enter(time doe) id(id) origin(time dob) scale(365.25)
      set seed 9123456
      sttocc, match(job) n(5) nodots
      This also works in Stata 17.

      Comment


      • #4

        Thanks to everyone who reviewed. There must be something wrong with the software. I deleted it and reinstalled it, and sttocc was able to run.

        Comment

        Working...
        X