Announcement

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

  • how do I get an overall p value for independent factor variables in linear regression

    Hi, I am running a backwards stepwise linear model with factor and continuous predictor variables. My code is:
    xi: stepwise, pr(0.1) pe(0.05): regress SCORE i.SexMale i.age_group i.lives_alone i.assistance respiratory_problem spasticity_problem etc etc
    Some of the factor variables have more than one level and I want to get an overall p-value in the model for the variable rather than for each level. Is this possible, and if so, how?!
    Thanks

  • #2
    Go back and re-do the regression without the obsolete -xi:- prefix. That is, use factor-variable notation instead. See -help fvvarilst-. Then you can get a simultaneous test for all the age_group indicators after the regression by running -testparm i.age_group-. But that won't work with -xi:-. For an overall p-value for the entire model, you don't have to do anything special. That is part of the regular output: you'll find it in the header that precedes the table of regression coefficients, where it is called "Prob > F."

    That said, I do hope you are aware that the p-values produced by stepwise regression are bogus, meaningless statistics. Do read https://www.stata.com/support/faqs/s...sion-problems/ for details.

    Comment


    • #3
      Thank you! The xi function was the only way I could get the backwards stepwise code to work. But I take your point that p values from stepwise regressions are rubbish and will revert to using and reporting a simple enter model.

      Comment

      Working...
      X