Hi all,
I have 3 data vectors read in iml which are
I want to mark these data by following discipline:
How can I do? Thank you!
You can use essentially the same syntax to construct Q like this:
lab = choose(k<k0,'put','mix');
lab = choose(k>k0,'call',lab);
Q = choose(k<k0, p, (p+c)/2);
Q = choose(k>k0, c, Q);
print k0 k lab p c Q;
I think this will work
lab = choose(k<k0,'put','mix');
lab = choose(k>k0,'call',lab);
print k0 k lab;
however you may need to screen missing values out first if you have them.
You can use essentially the same syntax to construct Q like this:
lab = choose(k<k0,'put','mix');
lab = choose(k>k0,'call',lab);
Q = choose(k<k0, p, (p+c)/2);
Q = choose(k>k0, c, Q);
print k0 k lab p c Q;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.