Software: IVEware Version 0.3 Documentation

IVEware with SPSS

IVEware with SPSS can be started from the Srcshell run editor or from SPSS. Using the Impute SPSS example, here’s how.

Starting from the Srcshell run editor

  1. Download and install Srclib as described in the IVEware Installation Guide.
  2. 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.
  3. Open or create and save an XML file (.xml) with the following structure, replacing the SPSS run name and statements and Impute run name and statements with your own.
    <spss name="ive_examples">
    
    /* iveware examples - spss version */
    
    /* import the input datasets */
    
    get translate file="mydata2.txt" /type=tab /fieldnames.
    save outfile="mydata2.sav".
    
    /* 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>
    
    </spss>
    

    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" />
    
  4. In Srcshell, click “run”. In emacs, press F8.
  5. When SPSS comes up, select “all” and click the “run” icon.Once you’ve created an SPSS setup file, ive_examples.spss in the example, you can reuse it by issuing the following command.
    spss ive_examples.sps
    

Starting from SPSS

  1. Download and install Srclib as described in the IVEware Installation Guide.
  2. Start SPSS.
  3. Change to the working directory you want to use.
  4. In the SPSS Syntax Editor, create and save an Impute setup file (.set) with the following structure, replacing the Impute statements with your own. The name of the opened or saved file should be the one you use in the invocation of Impute below.
    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;
    
  5. In the Syntax Editor, open or create and save an SPSS setup with the following structure, replacing the srclib location, the SPSS statements and the Impute run name with your own. Note that the srclib import path is the spss subdirectory of the srclib directory.
    begin program.
    import sys
    sys.path.insert(0, '~/srclib/spss')
    import srclib
    end program.
    
    /* iveware examples - spss version */
    
    /* import the input datasets */
    
    get translate file="mydata2.txt" /type=tab /fieldnames.
    save outfile="mydata2.sav".
    
    /* run iveware */
    
    /* multiple imputation */
    
    begin program.
    srclib.impute(name="impute")
    end program.
    
  6. Select “all” and click the “run” icon.

Please report problems or send comments via e-mail to IVEware Support: isr-iveware@umich.edu. For more detailed help, please complete and submit this Help Request form.