Regression BY variable

Welcome to our Forums Technical Support Support Desk Regression BY variable

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13273
    jimnoelak
    Participant

      In the plot below, I have a Points command, with the colors varying according to the variable LotNum, which has values 1 and 2.  There are also two Fit commands, one for LotNum=1 and one for LotNum=2:

      Screen Shot 2024-01-17 at 11.08.58 AM

      I would like to be able to do the same thing using ONE Fit command.  The idea is that one Fit command would create a different regression for each value of LotNum.  Is there a way to do this in DataGraph?

      #13276
      dgteam
      Moderator

        The Fit command can only do one fit at a time, though you could develop a single equation using the Multivariable Fit command, where you have one overall fit of the slope but a different intercept for each lot.

        Are you asking for that reason or so that you could use the same color scheme?

         

        #13292
        jimnoelak
        Participant

          The latter, basically.  To keep the example simple, I used only 2 different LotNum values, but the number of LotNums could actually be arbitrary, depending on other selection criteria.  So I’m hoping to find a simple way of showing several different regressions (color-coded), without having to manually create separate Fit commands for each possible LotNum value.

          I did try Multivariable Fit.  That did do a pretty good job of actually fitting the points, and might be helpful.  But ideally I’d like the result to look like the example, including line colors, separate equations and separate R-squared values.  Perhaps this feature could be added to the program, somewhere down the line?

          Love the program, by the way.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.

        Welcome to our Forums Technical Support Support Desk Regression BY variable