Announcement

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

  • #16
    Dear Daniel,

    Much appreciated!

    I have explored the rioc help file and, somehow, your last example runs into an error:
    Code:
    . rioc collgrad union , stats(all FPR_0: b/(n-f) FNR_1: c/f FPR_1: b/e FNR_0: c/(n-e)) percent
    option stats() not allowed
    I tried various options, but, even rioc union collgrad , stats(all) fails to run.

    Furthermore, I have been using your package to calculate for any cut off value between 0 and 100 whether or not RIOC can be computed and from the result I create a graph.

    I present two examples. For the first one I use the well known, and much discussed, example from Hosmer, Lemeshow, and Sturdivant (2013, 24) and run this model:
    Code:
    logit low age lwt i.race smoke ptl ht ui
    (the details are discussed in the Stata Manual, type h logistic and click on (View complete PDF manual entry))

    Next, I run my syntax as to create the following graph (rioc plot):
    Click image for larger version

Name:	Tutorial_RIOC_Lemeshow_Birthweight_Stata_Manual.png
Views:	1
Size:	144.5 KB
ID:	1591580



    For the second example I used the nlswork example data set to run the following model:
    Code:
    logit union i.collgrad ln_wage age race msp ind_code occ_code ttl_exp tenure
    Next, I run my syntax as to create the following graph (rioc plot):
    Click image for larger version

Name:	Tutorial_RIOC_NLS_Young_Women_Stata_Manual.png
Views:	1
Size:	162.3 KB
ID:	1591581



    I think such rioc plots are a very interesting addition to the 'tool box' of an analyst interested in the practical application of logit/logistic regression. Maybe there are other applications possible as well.

    I hesistate to clutter the Stata list with my syntax as I am not the best writer as such and very likely employ too many 'lines & loops' to produce what I want.
    But, maybe, Daniel, you are willing to inspect my code and possible are able to rewrite it more concise and add it as an option to the rioc package as well.
    If so, I can email the code to you.
    Last edited by ericmelse; 27 Jan 2021, 08:49.
    http://publicationslist.org/eric.melse

    Comment


    • #17
      Originally posted by Bruce Weaver View Post
      It appears that -cii- is called without any options, and so gives the default exact binomial CI. Is it possible to pass one of the other options to cii? E.g., I often like to use the wilson option. No big deal if not, but I thought I should ask. ;-)
      There is an undocumented option, cii(), that passes its argument through to cii. The option is not documented because (i) rioc does not check cii()'s argument before actually calling cii (late in the program), (ii) rioc ignores cii(), including any invalid argument, if neither detail nor stats() are specified, and (iii) rioc does not indicate which method was used to create the confidence interval. Keeping this in mind, you can get the wilson confidence interval typing

      Code:
      . rioc ... , stats(...) cii(wilson)

      Comment


      • #18
        Originally posted by ericmelse View Post
        I have explored the rioc help file and, somehow, your last example runs into an error:
        Code:
        . rioc collgrad union , stats(all FPR_0: b/(n-f) FNR_1: c/f FPR_1: b/e FNR_0: c/(n-e)) percent
        option stats() not allowed
        I tried various options, but, even rioc union collgrad , stats(all) fails to run.
        All examples work for me in Stata 16.1 and Stata 11.2. Do you, by any chance, have the old code from #10 in memory?


        Originally posted by ericmelse View Post
        But, maybe, Daniel, you are willing to inspect my code and possible are able to rewrite it more concise and add it as an option to the rioc package as well.
        If so, I can email the code to you.
        I have responded privately.

        Comment


        • #19
          Very strange Daniel. I also use 16.1, latest update of Jan. 21st.
          I deleted the ado and help files from the ado/r folder, manually, to be certain.
          Next, I used ssc install for a fresh installation.
          But, alas, I get the same error.
          http://publicationslist.org/eric.melse

          Comment


          • #20
            Eric,

            could you try the following sequence:

            Code:
            clear
            discard
            capture program drop _all
            which rioc , all
            sysuse nlsw88
            rioc collgrad union , stats(all)

            Comment


            • #21
              Originally posted by daniel klein View Post
              ...you can get the wilson confidence interval typing

              Code:
              . rioc ... , stats(...) cii(wilson)
              Brilliant. Thanks Daniel.
              --
              Bruce Weaver
              Email: [email protected]
              Version: Stata/MP 18.5 (Windows)

              Comment


              • #22
                Dear Daniel,

                Thank you for your code to test my system (#20).
                I have found the cause of my problem.
                Actually, your first suggestion was correct (#18).
                My working folder, where various data & result files are stored, also contained your previous rioc.ado file.
                So, Stata first searched the working folder and used the previous version, and next searched the ado/plus/r folder and used the rioc.sthlp file.
                Hence my confusion, being able to read the help file but failing to get the proper result from rioc.
                After I moved the rioc.ado from the working folder, this issue, of course, is solved and rioc produces the statistics.
                http://publicationslist.org/eric.melse

                Comment

                Working...
                X