Announcement

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

  • Lowess of multiple variables in one graph

    I know that there is a way to get multiple lowess curves in one graph but I can't remember how I did it. I wrote:

    is there a way to get a lowess plot with all of the Y variables in one graph?

    I wrote

    mlowess year_04 FOR_1920 IRE_1920 ITAL_1920 ILLT_1920 mexpop1920_01 BLAC_1920

    but received separate graphs for each variable. How might I get a single graph for each of the variables FOR_1920 - BLAC_1920 by year_04?

    Thanks,

    Ric

  • #2
    you don't provide a data example but here is a toy example using the Stata-supplied auto data:
    Code:
    sysuse auto
    lowess price trunk, addplot(lowess price mpg)

    Comment


    • #3
      Thanks, I wrote:

      lowess FOR_1920 year_04, addplot(lowess IRE_1920 ITAL_1920 ILLT_1920 mexpop1920_01 BLAC_1920 year_04)

      but got the response: too many variables specified

      There is a way to get the curves in one graph. I did it a few years ago but can't find my commands.

      Comment


      • #4
        no, you have to separate the graphs as in the following silly example:
        Code:
        lowess price trunk, addplot(lowess price mpg || lowess price displacement)

        Comment


        • #5
          mlowess from SSC isn't what you want. It's in effect for one flavour of generalized additive model.

          lowess or twoway lowess is for one outcome or response and one predictor, so as Rich Goldstein exemplifies you have to combine several such calls.

          Comment

          Working...
          X