Announcement

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

  • Logistic regression (logit)

    Hi,
    I am currently working on a school assignment. The assignment is suited for an “either-or” situation, and I am going to use logistic regression. I am now working on the dataset to use in Stata.

    I have 100 cars for each year from 2013-2016, either they break down or they don’t, so 1 they break down, or 0 they don’t. The car can also be fixed, and then go back to 1, but would be 0 as long as it takes to fix it. All the cars have different specifications, like age, miles etc. I am going to use daily observations and run a logistic regression for each year.

    In that case, the same car would have 365 observations every year. Is there any way of telling Stata to repeat the same observation several times?
    For example: If car X runs for 200 days and then breaks down for the rest of the year, there would be 200 observations of 0 and 155 of 1. Is there any easy way of doing this in Stata without repeating the observation by copying it by “hand”?

    The aim of the assignment is to see which specifications of the car makes it more reliable. Do you have any thoughts of other types of regression I can use?

    Regards, Gerald McCoy

  • #2
    First, you'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code deimiters, Stata output, and sample data using dataex. Also, try to reduce the code you include to what is needed to demonstrate your problem. You should also have searched for the major terms in your question from the command window of Stata (findit majorterm) and in the subject index in the documentation (under index at the bottom of the list of documentation).

    The FAQ notes that we do not do your homework for you. You can do this with glm and binomial. Or you can figure out how to duplicate the observations in the data.

    Comment


    • #3
      Originally posted by Phil Bromiley View Post
      The FAQ notes that we do not do your homework for you.
      Phil, I don't think the FAQ says that.

      Comment


      • #4
        I think Phil is alluding to this: http://www.statalist.org/forums/help#adviceextras

        See section 4.

        We do request that people don't ask or answer homework questions. No more, no less.

        Comment


        • #5
          Thank you, Nick. The reference to homework questions used to be in the main FAQ but it disappeared at some point. Now I know why.

          Comment


          • #6
            A statement about homework questions was inserted into the Statalist FAQ in the time of the email forum after a flurry of such questions and what appeared to be a consensus view that they were inappropriate. In that and in other ways the FAQ was occasionally lengthened (although there were excisions also).

            At the time of setting up the present forum in 2014, there was a mood for a tighter, crisper FAQ and the mention of homework questions was one of the items cut, as homework questions seemed to have become rare.

            That is no longer quite true, and so a statement was inserted once again into the documented cited in #4.

            Comment


            • #7
              I seem to remember a thread where the "no homework" policy was challenged. My own inclination, if I respond, is to treat it like a would an inquiry from one of my own students: refer the person to useful materials, but don't solve the problem for them.

              Via email, I recently got a few inquiries from somebody who claimed they were trying to learn statistics on their own, but I was 99.99% sure was sending me homework problems. I gave the person links to my relevant online notes, but when he persisted on asking Qs I just quit responding to him. I might have felt more sympathetic if it was clear he was at least trying before coming straight to me with questions.
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              StataNow Version: 19.5 MP (2 processor)

              EMAIL: [email protected]
              WWW: https://www3.nd.edu/~rwilliam

              Comment


              • #8
                I don't expect unanimity on such points, nor on several others. We make requests. I try very hard to avoid the word rule; the argument should be that every request is in the best interests of the forum or of the community. With homework, the case is oblique, but it can still be made.

                Democracy on Statalist means that you get to say what you think or to do what you want -- so long as it's not spam or deemed to be too rude by StataCorp. None of the most active people here implement any of that!

                Comment

                Working...
                X