0

Consider this standard linear regression model:

$Y = \beta_0+\beta_1X_1+\cdots+\beta_pX_p+\epsilon$

I've loaded such a dataset into Stata 12.0, so I have some variables $y,x_1,x_2,\dots,x_p$. How do I produce a plot, like I would with . scatter y x for a simple linear regression model?

Nick Cox
  • 48,377
  • 8
  • 110
  • 156
Newb
  • 289
  • 3
  • 12
  • Do you mean `scatter y x || lfit y x` ? – martin Oct 24 '13 at 08:32
  • 1
    This question appears to be off-topic because it is only about how to do something in Stata, not about Statistics. If there's an underlying statistical matter you want help on, please edit the post to make it clear. – Scortchi - Reinstate Monica Oct 24 '13 at 08:33
  • 1
    @Scortchi and voters on closure: I think there is a statistical question deep inside this as well as a Stata question, so I'd suggest keeping it open. The focus should be: exactly what goes on what axis, and is this a single or a multiple plot? – Nick Cox Oct 24 '13 at 08:36
  • @NickCox et al. Let's ask Newb. Newb, do you know what you want to graph and just not know how to do it in Stata? Or do you want to know about good graphics for this sort of situation, and then you can figure out the Stata code on your own? Or both? – Peter Flom Oct 24 '13 at 10:56
  • 2
    Could be a duplicate of [this](http://stats.stackexchange.com/questions/73320/how-to-visualize-multi-linear-regression) then. – Scortchi - Reinstate Monica Oct 24 '13 at 12:15
  • This hasn't been clarified.... – Nick Cox Oct 25 '13 at 14:49
  • My question was about whether it's possible to compose all $\beta_1 X_1 \ldots \beta_P X_P$ into a single $X$-variable, and then to conduct simple linear regression. – Newb Oct 25 '13 at 14:58
  • You would need to get the $\beta_j$ first. If that's by estimation, it is multiple regression and not to be followed by a simple regression. If that's otherwise, you could do that. – Nick Cox Oct 26 '13 at 01:05

0 Answers0