Help with this simple script of fit y by xHello. I try to study the relationship of a quantitative variable with multiple quantitative variables. I wrote this script but it doesn't work. I show you the script and the error message. Thank you in advance.
Script
Names Default To Here( 1 );
dt = Current Data Table();
numericColNames = dt << get column names( string, numeric );
For( i = 38, i <= N Items( numericColNames ), i++,
Bivariate(
Y( :Name( "ERC [%]" ) ),
X( (__col__) ),
Fit Line( {Report( 0 ), Line Color( {212, 73, 88} ), Report( 0 )} )
);
);
Error
Names Default To Here( 1 );
dt = Current Data Table();
numericColNames = dt << get column names( string, numeric );
For( i = 38, i <= N Items( numericColNames ), i++,
Bivariate(
Y( :Name( "ERC [%]" ) ),
X( (__col__) ),
Fit Line( {Report( 0 ), Line Color( {212, 73, 88} ), Report( 0 )} )
);
);
Data Exploration and VisualizationRe: Help with this simple script of fit y by xI think you didn't remember to add the error message. Also when posting scripts you should use
as it makes readability much better (I did edit your message to use this).
Re: Help with this simple script of fit y by xJust looking at your script, it doesn't look like you are using your loop for anything (i isn't being used) besides replicating Bivariate IF you have __col__ defined correctly somewhere. It might be enough if you change
X((__col__))
to
X(Eval(numericColNames[i])),
Re: Help with this simple script of fit y by xNames Default To Here( 1 );
dt = Current Data Table();
numericColNames = dt << get column names( string, numeric );
For( i = 38, i <= N Items( numericColNames ), i++,
Bivariate(
Y( :Name( "ERC [%]" ) ),
X( (__col__) ),
Fit Line( {Report( 0 ), Line Color( {212, 73, 88} ), Report( 0 )} )
);
);
Not Found in access or evaluation of 'Bivariate' , Bad Argument( {__col__, Role requires at least 1 columns.} ), Bivariate(/*###*/Y( :Name( "ERC [%]" ) ),
X( __col__ ),
Fit Line( {Report( 0 ), Line Color( {212, 73, 88} ), Report( 0 )} )
)
Re: Help with this simple script of fit y by xSorry.
Re: Help with this simple script of fit y by xOk I think the issues is what I did explain in my second response. If you want it to be a bit more obvious you can define __xcol__
Names Default To Here(1);
dt = Current Data Table();
numericColNames = dt << get column names(string, numeric);
For(i = 38, i <= N Items(numericColNames), i++,
__col__ = numericColNames[i];
Bivariate(
Y(:Name("ERC [%]")),
X(Eval(__col__)),
Fit Line({Report(0), Line Color({212, 73, 88}), Report(0)})
);
);
Also if you are using JMP16+ using For Each is usually better than using just For
Re: Help with this simple script of fit y by xGoing from 9 to 14 was fantastic. With 14 I'm more than happy. Thank you so much