Announcement

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

  • #16
    I have run following commands:

    * missing values- mdesc

    * working with a subset that is empty in your data- mdesc

    * supplying a string variable where a numeric variable is needed- varmanage

    Comment


    • #17
      I have never used this program, but your call restricts observations to those where the second variable is a constant. Perhaps that is an infeasible request. I am still speculating.

      Without more information, I won't be able to say more. Perhaps you should write your own program to do what you want.

      Comment


      • #18
        Originally posted by Ankit Bhardwaj View Post
        Dear Statisticians,
        Kindly help me with the calibration plot. I am not able to get it after running the pmcalplot command; instead, I am getting the below error message.

        pmcalplot p_dev VNTSept if VNTSept ==1, ci
        Binary option selected: Calibration plot for logistic prediction model displaying...
        r(2000);
        Hi Ankit Bhardwaj,

        Sorry to hear you're having trouble with pmcalplot. Nick contacted me via email to see if I can help. Hopefully we can resolve your issue.

        If we look back at your command line in post #12 above, while the format looks correct, the logic causes an issue. p_dev is a variable containing the predicted probabilties from your model. VNTSept should be your outcome variable, coded [0,1] with non-events==0 and events==1.

        I suspect if you remove the if statement, the command will execute without error and produce your plot. The if statement here limits the calculations to the subgroup of events only. This would make little sense for creating a calibration plot, where we are looking to assess how well a models predictions match observed outcomes.

        The 'if' clause can be used with pmcalplot, but it would more commonly be used to plot for say only the training set, or only the test set for example. There is an example like this in the help file. Perhaps that is where you have derived your code including the 'if' from?

        Please let me know if this helps.

        And thank you to all those who have tried to help earlier in the thread.

        Best wishes,
        Joie
        Last edited by Joie Ensor; 20 Nov 2024, 09:15.

        Comment


        • #19
          Dear Joie,
          Thank you for your valuable feedback, and I apologize for my delayed response. I haven't logged into this forum in a long time. I was mistakenly using the "if" command, which wasn't necessary. Basically, I copied the "pmcalplot" command from an example in the tutorial, which was applicable to the training set. I appreciate everyone who helped me with this issue.

          Comment


          • #20
            Pedantically, or otherwise:

            1. You weren't using the if command, which is separate. You were using the if qualifier. It's important not to conflate or confuse the two.


            Code:
            SJ-23-2 st0721  .  When to use the if qualifier and when to use the if command
                    . . . . . . . . . . . . . . . . . . . .  N. J. Cox and C. B. Schechter
                    Q2/23   SJ 23(2):589--594
            2. Using the if qualifier turns out not only to be not necessary but more crucially to be fatal. It is now clear from Joie Ensor 's explanation that such a request in your case amounted to asking for a curve but giving only a data point. There is a remaining question of whether his command can be modified to trap such a request with a more informative error message.

            Comment


            • #21
              Thank you

              Comment

              Working...
              X