Announcement

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

  • How to see if there is linearity in a scatterplot with a categorical independent variable

    Hi,

    We are trying to do a linear regression to see whether chain affiliation has an influence on quality. In order to do a linear regression multiple assumptions need to be fulfilled, one of those is linearity. We wanted to consider linearity by making scatter-plots, however we have categorical independent variables so we don't know how we can see if this is linear or not... Anyone any suggestions?
    Attached Files

  • #2
    A deeper issue is whether the regression makes sense at all. Google tells me "room area", but even if 1, 2, 3 are ordered categories, the preferable approach in my view is to use two indicator variables for the three categories.

    Comment


    • #3
      You will increase your chances of useful answer by following the FAQ on asking questions-divide Stata code in code delimiters, readable Stata output, and sample data using dataex.

      To expand on Nick's comment, with only three values for the right-hand side variables, and very few observations on the third value, as Nick pointed out it makes little sense to test for linearity. Obviously, if you only have two values you could never reject linearity. Whether it makes more sense to have two indicator variables or maintain the linearity assumption is not obvious to me. But you haven't got enough variance in x to really think much about nonlinearities.

      Comment


      • #4
        I am a bit unsure, since I have never seen a graph like this, but I think this data would be better represented as a bar chart or histogram than as a scatter plot.

        Comment

        Working...
        X