/*************************************************/ /* File for converting .PV files to .XLS format */ /* Version 1.2 */ /* */ /* Written by: */ /* */ /* G. John Geldhof */ /* Graduate Student, Department of Psychology */ /* University of Kansas */ /* */ /* For: */ /* */ /* HTTP://QUANT.KU.EDU */ /* */ /*************************************************/ /*This program inputs a vector of LISREL parameter estimates and exports them to Excel 2000/2003. There are several pieces of informaion that you need to provide, please read all documentation. */ /*Please specify the location of the bootstrapped parameter estimates (PV file). A sample .PV file is included in the .ZIP file that this code came in.*/ filename boot "C:\Documents and Settings\geldhof\Desktop\bootpv.pv"; data useboot; infile boot; /*reads data into a SAS file for export*/ /*The user must specify how many parameter estimates are in each iteration. To do this, change "param22" in the next line to "param#" where # is the nuber of estimates for your model*/ input imp t1 t2 (param1-param22) (13.); run; data useboot; set useboot; /*This deletes data from iterations that did not converge*/ if t1=1 then delete; run; data wboot; set useboot (drop = imp t1 t2); /*drops the imp, t1, and t2 variables from the parameter estimates dataset*/ run; proc export data = wboot /*Code to export SAS data file to Excel*/ dbms=excel2000 /*On the next line, specify the directory where you want the .XLS file to be created*/ outfile= "C:\Documents and Settings\geldhof\Desktop\Bootstrapped.xls"; /*Then specify the name of the sheet that you want to create within the .XLS*/ sheet='Bootstrap'; run;