IVEware with SAS can be started from the Srcshell run editor or from SAS. Using the Impute SAS example, here’s how.
Starting from the Srcshell run editor
- Download and install Srclib as described in the IVEware Installation Guide.
- In Windows start the Srcshell run editor. In Linux or Mac OS X run emacs with “-l ~/srclib/srcshell.el” as a command-line or icon option.
- Open or create and save an XML file (.xml) with the following structure, replacing the SAS run name and statements and Impute run name and statements with your own.
<sas name="ive_examples"> /* iveware examples - sas version */ /* import the input datasets */ proc import datafile='mydata2.txt' out=mydata2 dbms=tab replace; getnames=yes; run; /* run iveware */ /* multiple imputation */ <impute name="impute"> title Multiple imputation; datain mydata2; dataout impute; default continuous; categorical casecnt gender race3 hyper diab smoke fammi edusubj3 cholesth; mixed cafftot alcohol3; transfer studyid; restrict numcig(smoke=2,3) yrssmoke(smoke=2,3); bounds numcig(>0) yrssmoke(>0,<=age-12) fatindex(>0) cafftot(>=0) alcohol3(>=0); maxpred redtot(3) wgtkg(2); minrsqd .01; iterations 5; multiples 5; seed 2001; run; </impute> </sas>
If the impute.set file exists, perhaps from a previous run, you can reuse it by replacing <impute name=”impute”>…</impute> with the following.
<impute name="impute" />
- In Srcshell, click “run”. In emacs, press F8.Once you’ve created a SAS setup file, ive_examples.sas in the example, you can reuse it by issuing the following command.
sas ive_examples.sas
Starting from SAS
- Download and install Srclib as described in the IVEware Installation Guide.
- Start SAS.
- Change to the working directory you want to use.
- In the Program Editor (NOT the Windows Enhanced Editor), open or create and save a SAS program (.sas) file with the following structure, replacing the SRCLIB environmental variable, the SAS statements and the Impute run name and statements with your own. Note that the SRCLIB environmental variable is the sas subdirectory of the srclib directory. This is a change from previous installations.
options set = SRCLIB '~/srclib/sas' sasautos = ('!SRCLIB' sasautos) mautosource; /* iveware examples - sas version */ /* import the input datasets */ proc import datafile='mydata2.txt' out=mydata2 dbms=tab replace; getnames=yes; run; /* run iveware */ /* multiple imputation */ %impute(name=impute,dir=.,setup=new) title Multiple imputation; datain mydata2; dataout impute; default continuous; categorical casecnt gender race3 hyper diab smoke fammi edusubj3 cholesth; mixed cafftot alcohol3; transfer studyid; restrict numcig(smoke=2,3) yrssmoke(smoke=2,3); bounds numcig(>0) yrssmoke(>0,<=age-12) fatindex(>0) cafftot(>=0) alcohol3(>=0); maxpred redtot(3) wgtkg(2); minrsqd .01; iterations 5; multiples 5; seed 2001; run;
- Click “run”.
Please report problems or send comments via e-mail to IVEware Support: [email protected]. For more detailed help, please complete and submit this Help Request form.