Announcement

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

  • #31
    Hi

    Sorry, i need to tap over here about the firth logistic. I am rather new to STATA. I have just installed the firth logistic package base on the advice here using the "search firthlogit" and tried to key in the command "firthlogit response i.nationality" or firthlogit response nationalityx as I have created dummy variables for the nationality. But the outcome came out "variable response not found, r(111)". This is strange as I have recheck my spelling etc and I tried on continuous variables, the same error result occur.

    Appreciate for advice on where did I go wrong or did i miss a syntax or something.

    Comment


    • #32
      Try
      Code:
      logit response i.nationality
      or even
      Code:
      regress response i.nationality
      and report back.

      Comment


      • #33
        Hi Joseph

        I have tried the codes and got the same error message.
        Apology I have to post screenshots & my dataset to have better view on what am I seeing in Stata screen.
        Attached Files

        Comment


        • #34
          first, please read the FAQ on how to post

          second, it appears that you do NOT have a variable called response in your data (check by typing "d response") and any variable you call in such a command must already exist

          Comment


          • #35
            Hello John,

            This information from the Stata Manual may be helpful to you:

            Ancillary files are not really installed in the sense of being copied to an official place for use by Stata itself. They are merely copied into the current directory so that you may use them if you wish.
            In short, search the ancillary file in your working directory.
            Best regards,

            Marcos

            Comment


            • #36
              Originally posted by val snooky View Post
              I am rather new to STATA. I have just installed the firth logistic package base on the advice here using the "search firthlogit" and tried to key in the command "firthlogit response i.nationality" or firthlogit response nationalityx as I have created dummy variables for the nationality. But the outcome came out "variable response not found, r(111)". This is strange as I have recheck my spelling etc and I tried on continuous variables, the same error result occur.

              Appreciate for advice on where did I go wrong or did i miss a syntax or something.
              OK. Thanks for reporting back.

              firthlogit follows syntax for conventional regression commands in Stata, where you place the variable name of the response variable—a.k.a. dependent variable—immediately after the name of the command, and then place the predictor variable(s)—a.k.a. independent variable(s)—after that.

              I don't know where you saw "firthlogit response" (it's not like that in the help file), but what whoever it was was trying to tell you is not that you literally type "firthlogit response" at Stata's command line, but rather substitute the name of your response (dependent) variable at that place.

              firthlogit takes a binary 0/1 response (dependent) variable, and I don't see such a variable in the screenshot that you attached. Are you sure that firthlogit is what you need for whatever it is that you're trying to do?

              Comment


              • #37
                Much thankful for all inputs!
                Followed Joseph's advice and managed to get the reading.
                Initially I used logistic regress as my dependent variable is 0/1, with 15 categorical variables -sub levels ( combine and formed into dummy variables) and 6 continuous variables all input into the model at a go. The outcome was an error message that several categorical variables were omitted due to collinearity and model was not able to converge in STATA.
                I was advised to run firthlogit as a result to resolve this issue.
                Strangely enough, when I selected 2 variables to test:- age and all the dummy variables on nationality, the standard error for firthlogit is higher as compared to the normal logistic regress? Is it the norm? Or I should not use the logistic regress likelihood as a sense check instead.

                Lastly, I tried to run firthlogit by odds ratio, with this syntax "firthlogit, or sendx, age, nationalityx1, nationalityx2.....etc" I got an error message that "the last estimates not found".
                Is it due to the syntax or other reasons?

                Comment

                Working...
                X