Announcement

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

  • Logit Regression

    I'm a beginner to Stata. How do I import two (binary dependent variables) Excel files into one Stata sheet? Also, what should the logit command be for the binary choices?

    Thanks!

  • #2
    You don't provide enough information for a detailed answer to your question. But here is an outline.

    1. Assuming that the Excel files are reasonably well organized, they must first be imported separately. The -import excel- command will do that.

    2. Once each has been separately imported to a Stata file, if each contains different variables on the same observational units, then they probably can be put together using the -merge- command. That depends on how the data are organized in the two files. Sometimes -joinby- or -cross- is needed instead.

    Before you work on a consequential project, you need to become familiar with Stata basics. Launch Stata and open the Help drop-down menu from its toolbar. Select PDF Documentation. Read the Getting Started [GS] and User's Guide [U] volumes. There you will learn about Stata's orientation towards data management and analysis (which is very different from that of a spreadsheet), and you will also learn the most fundamental commands that everyone needs to know to be productive with Stata. You will also learn about the general syntax that applies to the vast majority of Stata commands. You won't remember every detail, but you will probably retain enough that in most situations you will have a good sense of which commands are likely to be helpful, and you will understand how to read the help files and PDF documentation to fill in the details. It will take you some time to get through this lengthy read, but that investment will be amply repaid in short order.

    Comment


    • #3
      Just a few notes:

      You may use - logit - to get the coefficients, and - logistic - to get the odds ratio.

      To import from Excel to Stata, you are supposed to use - import excel - command. Please type - help import excel - in the command window to see the instructions.

      If you are a beginner in Stata, that's no problem. The commands are quite easy to understand. Please type - help logit - as well as - help logistic - in the command window.

      However, tips cannot at all replace a good grasp of the core-knowledge concerning logistic regression. For this, we may start by reading a decent text book on the matter. Also, the Stata Manual and some tutorials on the Web. The are also introductory books ( e.g., A Gentle Introduction to Stata) as well as other works specifically related to models for categorical variables in the Stata Bookstore.

      Any effort to understand the main principles will be extremely rewarding to you, now and in the future.
      Best regards,

      Marcos

      Comment

      Working...
      X