I have made the following graph using JMP 13.1.0:

I want to manually add a line from my multiple regression model that looks like:
- Log(estimate) = intercept + Log(truth) + Domain + Log(truth)*Log(truth) + Log(truth)*Domain + Log(truth)*Log(truth)*Domain
Based on the graph above:
Variables(
X( :Name( "Log(truth)" ) ),
Y( :Name( "Log(estimate)" ) ),
Overlay( :Domain )
),
I have tried the following script:
Dispatch(
{},
"Graph Builder",
FrameBox,
{Add Graphics Script(
2,
Description( "Script" ),
Pen Color( "green" );
Pen Size( 3 );
Y Function(-.333 - .31(Domain) + .236(x) - .029(x*x) + .107(Domain*x) + .330(Domain*x*x), x )However, it is not working because I do not know how to refer to my "domain" variable, which is overlayed in the graph displayted above.
Thanks for any help,
Adrian
Adrian,
I assume the Domain==1 for food and 0 for gadgets. First .31(Domain) woudl not work without a multiplication symbol (*).
I suggest the following: sepcify 2 lines, one when Domain==1 and another when Domain==0 or substitute the appropriate indicator values and use the mutiplication symbol.
Dispatch(
{},
"Graph Builder",
FrameBox,
{Add Graphics Script(
2,
Description( "Script" ),
Pen Color( "green" );
Pen Size( 3 );
Y Function(-.333 - .31 + .236*x - .029*x*x + .107*x + .330*x*x, x );
Y Function(-.333 + .236*x - .029*x*x , x );
Cool graph!