Announcement

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

  • Questions about the problem in Regression and Interactions

    Hello.
    I'm using ESS 2014 database (ESS7e02.0F1.dta).
    I have a problem when I'm conducting the regression and interaction.

    I want to know how seven independent factors affect the number of cigarette consumptions in Europe.
    My dependent variable is the number of cigarette consumption per day
    Independent variables are age, gender, income, alcohol consumption, weight, divorce, and education.
    I have no problem with proceeding regressions. Following was my command.
    ----------------------
    regress smoking age b1.gender b1.incomedummy b4.alcoholgroup b3.eduhigh weight b1.divorce
    ----------------------

    But I encountered one problem when I tried to compare by countries.
    Since cntry is not factor variables but string variables,
    I did as following.
    ----------------------
    encode cntry, gen(country)
    fre country
    ----------------------
    Now I added country with b10 as my reference category.
    ----------------------
    regress smoking age b1.gender b1.incomedummy b4.alcoholgroup b3.eduhigh weight b1.divorce b10.country
    ----------------------
    But the result is the country number 7 and 10 are skipped. Country 7 is always skipped whenever I change the reference category.
    How can I do?

    Attached file is the screenshot.

    Thank you so much in advance.

    Click image for larger version

Name:	2016-12-04 오전 7.58.32.png
Views:	1
Size:	81.5 KB
ID:	1366688

  • #2
    This is the Mata forum (a programming language in Stata), you might want to post your question in the general forum (http://www.statalist.org/forums/foru...ussion/general), which is checked by significantly more people.

    Comment


    • #3
      hi
      my thesis method is interrupted time series(segmented regression). my segmented regression model as fallow
      Click image for larger version

Name:	seg regress model.png
Views:	2
Size:	11.6 KB
ID:	1367266

      i need the command for segmented regression in STATA. i do not know how estimate β0/ β1/ β2 and β3. data are monthly (30 month) and intervention has happened in 14th month.

      Thank you so much in advance.

      Comment


      • #4
        Originally posted by Jesse Wursten View Post
        This is the Mata forum (a programming language in Stata), you might want to post your question in the general forum (http://www.statalist.org/forums/foru...ussion/general), which is checked by significantly more people.
        See the quote.

        Comment

        Working...
        X