Hello everyone,
I am trying to figure out how to Fit Y by X, where Y cycles through all of my Numerical-Continuous columns ending in "_CODED" that have been produced earlier in the script. After every column has been used as Y for the first X, I'd like to have the next "_CODED" column be used as a new X, and have the Y columns be cycled through again, until all possible graphs have been produced, preferably in a single window instead of separate windows.
I am having trouble using a variable for the CODED columns in the Bivariate portion of the script, which is what I think I need to do, but everything I've tried so far has produced errors. Could someone look through what I have and try to help me with this?
dt = Data Table("data.jmp");
cols = dt << get column names(Character); //List all character columns
For (i = 1, i <= N Items(cols), i++,
one_col = cols << get name;
coded_col = one_col || "_CODED";
col_expr = evalinsert(
"\[ dt << New Column("^coded_col^", Numeric, "Continuous",
Format("Best", 12), Formula(
if (:name("^one_col^") == "PASS", 1,
:name("^one_col^") == "FAIL", 2,
:name("^one_col^") == "", 3,
:name("^one_col^") == "NOTTESTED", 4,
:name("^one_col^") == "IGNORE", 5,
:name("^one_col^") == "PASS|PASS", 6,
:name("^one_col^") == "IGNORE|IGNORE", 7,
:name("^one_col^") == "NOTTESTED|NOTTESTED", 8;
);
)
);]\");
eval(parse(col_expr))
);
//That was all to produce new Numerical-Continuous columns out of the columns I have. Continuing the script, I am trying to create Y by X graphs of these new columns. I'm actually not quite sure what to do here..
Bivariate(
Y( (coded_col),
X( (coded_col),
Fit Line( {Line Color( {213, 72, 87} )} )
)
)
;
)