I would like to display both linear and quadratic fit lines in the same plot. Essentially a combination of the two plots I've attached to this post.
graph 1graph 2
Is this possible in JMP?
Thank you
Given your intention, it might be better to look at 'Analyze > Fit Y By X'.
This script:
dt = Open("$SAMPLE_DATA/Big Class.jmp"); biv = dt << Bivariate( Y( :height ), X( :weight ), GroupBy( :sex ), FitLine(), FitPolynomial(2) )
will produce output like this:
and there are lots of additional customizations you could use.
I don't think you can do this in Graph Builder, but you can in Fit Y by X.
It looks like you may have an overlay variable, just be sure to use the Fit Y by X "Group By" command before fitting the lines and the quadratic polynomials.
I agree with @Dan_Obermiller and @ian_jmp but if you really need to use Graph Builder, then the approach is to first fit the models separately and save each one of them as column formula. Then add these columns in the Y drop zone of Graph Builder. Now change the rendering element to Formula.
Hi @JonathanL,
This can be done in Graph Builder, if you would prefer to do it there. If you would like to display a second line element using a different degree, you'll need to add that second element, either by holding the shift key and clicking the line of fit element, or dragging the line of fit element into the graph after you've already selected it. Then, you can change the degree for this second line of fit element. Like every other element, variables in other roles are respected unless disabled, so if you have a variable in the Overlay role, both of these line elements will display lines of fit separately for the levels of the Overlay variable.
@jules