Announcement

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

  • Regressions with Dummy Variables

    Click image for larger version

Name:	table3.PNG
Views:	1
Size:	245.7 KB
ID:	1541310

    Hi all,

    I am trying to replicate the following table. My code is as follows:

    foreach dependent in `dependents' {
    probit `dependent' i.divorcelaw#equitable i.divorcelaw#commonlaw i.divorcelaw#community divorcelaw equitable commonlaw marrlength age i.female#hispanic i.female#black i.female#highschoolgrad i.female#collegegrad i.female#somecollege i.female#metrostat i.statefip i.year i.female_2#hispanic_2 i.female_2#black_2 i.female_2#highschoolgrad_2 i.female_2#collegegrad_2 i.female_2#somecollege_2 i.female_2#metrostat_2 age_2, cluster(clustervar)
    probit `dependent' divorcelaw divorcelaw#faultlaw divorcelaw#nofaultlaw nofaultlaw marrlength age i.female#hispanic i.female#black i.female#highschoolgrad i.female#collegegrad i.female#somecollege i.female#metrostat i.statefip i.year i.female_2#hispanic_2 i.female_2#black_2 i.female_2#highschoolgrad_2 i.female_2#collegegrad_2 i.female_2#somecollege_2 i.female_2#metrostat_2 age_2, cluster(clustervar)
    }

    Where equitable, commonlaw, community, all are equal to 0 or 1 depending on if you have it or not. Also, faultlaw=1 if you have a faultlaw while nofaultlaw takes the value of 1 if you don't. I am just ending up with lots of collinearity problems. I have dropped and added different controls and variables. Not sure what I am doing wrong.

    Can you assist?
    Thanks!

  • #2
    I doubt anyone can clarify the situation without example data. Please post back using the -dataex- command to show an example of your data that encounters the same problem when run with the same code. If you are running version 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    When asking for help with code, always show example data. When showing example data, always use -dataex-.

    Comment

    Working...
    X