Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.
how to select only those samples that meet two or more criteria
Created:
Sep 22, 2022 11:56 AM
| Last Modified: Jun 9, 2023 8:58 AM(3437 views)
i want to create a new column using Day1_Orig values wherein there are both Day1_Orig and Day1_Repeat values for the same SUBJID. So for instance, lines 113 and 114 have same SUBJID, so the new column would record the value of the Day1_Orig value in line 113 (834), but as there is no corresponding Day1_Repeat value for line 107 (641), this Day1_Orig value would not be included in the new column.
Names Default To Here(1);
dt = New Table("Untitled 3",
Add Rows(6),
New Column("S", Numeric, "Continuous", Format("Best", 12), Set Values([89, 89, 96, 96, 96, 96])),
New Column("O", Numeric, "Continuous", Format("Best", 12), Set Values([641, ., 834, ., ., .])),
New Column("R", Numeric, "Continuous", Format("Best", 12), Set Values([., ., ., 230, ., .]))
);
dt << New Column("Test", Numeric, Continuous, Formula(
If(Col Number(:O, :S) != 0 & Col Number(:R, :S), /*check if both :o and :R have value for this :S*/
If(Col Cumulative Sum(!IsMissing(:O), :S) == 1, /* Check if row is first found value for :o for this :S*/
:O
)
);
));