Announcement

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

  • is it possible to do linear regression with no constant without adding bias?

    Hi,

    I need to use some coefficients from an OLS model to predict something, and I want to make that prediction at the means of the variables in my model. I have categorical variables in my model. The prediction requires me to use the constant. Because the constant represents the value when the covariates are 0, the constant represents the reference values of the categorical variables. I want the constant to represent only a single reference value of one of the categorical variables. It would make sense to not use a constant, in terms of interpretation, but that forces the regression line to pass through the origin and frees the mean of the residuals to equal a value other than 0.

    To clarify, the constant represents the reference value for multiple categorical variables. But I want the value of only one of them so that I can take the values of the other reference categories at their means. I want to separate the constant into its meaningful parts.

    Is this possible?

    Thank you,

    Kris

  • #2
    If I understand what you want here, I don't think there is any way to directly do this. But if you just need the expected value of your outcome variable when x1 = 0 and when x2,... are all at their average values, then after the regression just run:

    Code:
    margins, at(x1 = 0) atmeans
    If you are not familiar with the -margins- command, I recommend Richard Williams' Stata Journal article http://www.stata-journal.com/sjpdf.h...iclenum=st0260 as the best introduction to it. Once you have learned the basics there, you can go on to read the manual section to discover the many useful things this command can do.

    Comment

    Working...
    X