Announcement

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

  • Problem with subcommands within a user written command

    Hi

    This forum has been very useful, thanks to all the contributors. I'd be grateful for some advice:

    I'm attempting to use a command - stmfpt - written by Patrick Royston.

    This was recommended in the following paper, as a method of dealing with non-proportional hazards in Cox regression: https://pubmed.ncbi.nlm.nih.gov/34806210/

    I have successfully run this command on my own version of Stata using some dummy data (16.1), however the data and Stata program (16.1) I need to work on are on a platform that I have to access via a secure server. Any additional Stata commands have to be uploaded separately.

    After attempting to run the uploaded stmfpt command on the platform I receive the error "command _mfptGetVL is unrecognised". I've had a look at the stmfpt command do-file and tried to download this subcommand separately without success. I don't have any programming experience and wonder if i'm overlooking something simple? The stmfpt command works file on my personal computer.

    Thanks for your advice.

  • #2
    The two commands

    Code:
    net describe stmfpt, from(http://www.homepages.ucl.ac.uk/~ucakjpr/stata)
    net instal stmfpt
    should install all the files you need. You may need to specify , replace as well.

    Comment


    • #3
      Thanks Nick.

      Yes I used that code to access the files and successfully ran it on my own version of Stata.

      However i'm required to use a version of Stata on which I cannot download commands directly, they need to be uploaded manually. After the stmfpt.ado file was uploaded to our secure server, it doesn't seem to include the subcommand _mfptGetVL, there may be other subcommands within stmfpt.ado where I will hit the same issue?

      Apologies if i'm not being clear about the problem!

      Comment


      • #4
        Apologies Nick, I think i've found the solution after rerunning your recommended command - the additional _mfptGetVL file was hidden away in a subfolder of my personal ado folder.

        Many thanks

        Comment


        • #5
          It's not a subcommand. A subcommand is for example connected in twoway connected.

          But I wasn't misled by that.

          What you're missing is a file defining that as a separate command. The upload was evidently a failure if _mfptGetVL.ado is not visible. Note that Stata would put this in a different folder. If you asked system people to do it there are overwhelming odds that they used a browser and did not install using Stata.

          The first command in #2 shows all the files you need.

          Code:
          . net describe stmfpt, from(http://www.homepages.ucl.ac.uk/~ucakjpr/stata)
          
          ----------------------------------------------------------------------------------------------
          package stmfpt from http://www.homepages.ucl.ac.uk/~ucakjpr/stata
          ----------------------------------------------------------------------------------------------
          
          TITLE
                stmfpt. Build multivariable Cox models with time-dependent covariate effects
          
          DESCRIPTION/AUTHOR(S)
                stfpt. Time-varying effects in Cox models: detection and modelling
                Program by Patrick Royston.
                
                Distribution-Date: 20090507
                
                Please direct queries to Patrick Royston ([email protected])
                
          
          INSTALLATION FILES                               (type net install stmfpt)
                stmfpt\stmfpt.ado
                stmfpt\stmfpt.hlp
                stmfpt\stfpt.ado
                stmfpt\stfpt.hlp
                stmfpt\_mfptxpredict.ado
                stmfpt\_mfptGetVL.ado
          You need them all

          Sorry, but necessarily I can't know more about putting stuff on your secure server than you do.

          Comment


          • #6
            Thanks for the clarification Nick

            Comment


            • #7
              #4 was not visible to me when I was writing what became #5. Good to hear the problem is solved.

              Comment

              Working...
              X