Hi!
How could I write JSL to "Save Columns -> Save Values" for saving t-square in Model Driven Multivariate Control Chart?
try use
obj << T Square Plot( SaveValues );
still cannot savevalues in new column T2
thanks
This seems to work fine for me (using JMP 17.2)
Names Default To Here(1); dt = Open("$SAMPLE_DATA/Quality Control/Flight Delays.jmp"); mdmcc = dt << Model Driven Multivariate Control Chart( Process(:AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN) ); mdmcc << T Square Plot(Save Values);
Hi jthi,
My JMP version is 17.0
I will try to update
Thanks
Can other information be saved from the calculation? I am creating a chart using a by variable (part). The T Squared value can be saved to table with slight modification. I would like to capture the number of Principal Components used for each part so I can recreate the same chart. If I save the script from running MDMCC all parts are sent to by group with 'Set Component' defined (different levels for different parts).
Can I pull the Component level by part of the MDMCC model for later use in script? I found a work around by doing a PCA analysis and pulling information based on the Eigenvalues. But it takes more lines of scripting.
//get number of different parts/skus nparts = n items(Associative Array(:Part) <<Get Keys); for each ({i}, 1::nparts, mdmcc[i] << T Square Plot (Save Values) );
Which values you wish to save? The values from the outline boxes? Which JMP are you using? How are you creating your MDMCC? << Get By Group Script and parsing the result could work or you could access the outline boxes and get results from those.
Edit:
JMP18 and collecting the outline box titles
Names Default To Here(1); dt = Open("$SAMPLE_DATA/Quality Control/Flight Delays.jmp"); dt << New Formula Column( Operation(Category("Date Time"), "Year Week"), Columns(:Flight Date) ); mdmcc = dt << Model Driven Multivariate Control Chart( Process(:AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN), By(:"Year Week[Flight Date]"n), Group Options(Return Group(0)) ); aa = Associative Array(); For Each({cur_obj}, mdmcc, rep = Report(cur_obj); aa[rep << get title] = rep[OutlineBox("T² for?")] << get title; ); show(aa);
with expressions you can mess with something like
Names Default To Here(1); dt = Open("$SAMPLE_DATA/Quality Control/Flight Delays.jmp"); dt << New Formula Column( Operation(Category("Date Time"), "Year Week"), Columns(:Flight Date) ); mdmcc = dt << Model Driven Multivariate Control Chart( Process(:AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN), By(:"Year Week[Flight Date]"n), Group Options(Return Group(1)) ); s = mdmcc << Get ByGroup Script; aa_res = Associative Array(); For(i = 1, i <= N Arg(s), i++, a = Arg(s, i); If(Head Name(a) == "SendToByGroup", sc = Extract Expr(a, Set Component(Wild())); If(!IsEmpty(sc), g = Extract Expr(a, List(Wild()))[1]; aa_res[Char(Name Expr(g))] = Char(Name Expr(sc)); ); ); );