The data comes from the SASHELP library, `sashelp.baseball`, which is a standard SAS data source.
1 Code Block
DATA STEP Data
Explanation : This block initializes the CAS session, displays the session reference, assigns all available CASlibs, creates a CAS table named `casuser.baseball` from the `sashelp.baseball` table (which contains baseball data), and configures the CAS session to collect performance metrics via the `sessopts=(metrics=true)` option.
Copied!
cas;
%put &_sessref_;
caslib _all_ assign;
data casuser.baseball;
set sashelp.baseball;
run;
options sessopts=(metrics=true);
1
cas;
2
%put &_sessref_;
3
caslib _all_ assign;
4
5
DATA casuser.baseball;
6
SET sashelp.baseball;
7
RUN;
8
options sessopts=(metrics=true);
2 Code Block
PROC FREQTAB
Explanation : This block executes the `PROC FREQTAB` procedure on the `casuser.baseball` CAS table. It generates cross-frequencies for the 'div' and 'team' variables. The `crosslist` option displays frequencies as a list. The `chisq` and `measures(cl)` options request the display of chi-square statistics and association measures with their confidence intervals (CL). The final command `cas &_sessref_ listhistory;` displays the history of CASL actions executed in the SAS log.
Copied!
proc freqtab data=casuser.baseball;
table div * team /
crosslist chisq measures(cl);
run;
cas &_sessref_ listhistory;
1
PROC FREQTABDATA=casuser.baseball;
2
TABLE div * team /
3
crosslist chisq measures(cl);
4
RUN;
5
cas &_sessref_ listhistory;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.