How WesVar Works

WesVar Analysis Steps

Step 1 – Create a WesVar data file.

WesVar reads a variety of file formats. In Figure 1, the user reads the data from an SPSS system file and specifies the full sample weight and case ID variables. The data are a sample of cases from a national health and nutrition survey.

Data File screen

Figure 1. Indicating the Data File screen for importing files

In Figure 2, the user selects the remaining variables on the input file for later analyses. The file must then be saved as a WesVar data file.

Data File screen

Figure 2. Moving source variables into the set of variables for analysis using the mouse or arrow buttons

Step 2 – Create new or import existing replicate weights.

WesVar uses one of five replication methods to calculate variances of survey estimates. To do so, the user first creates replicate weights or imports existing replicate weights.

In Figure 3, the user specifies a variable that defines strata and another that defines the primary sampling units (PSUs). The user also selects a method of variance estimation.

In this example, the sample design had two PSUs in each stratum. Balanced repeated replication (BRR) was specified, and WesVar automatically selected a Hadamard matrix of appropriate size based on the number of strata in the data file.

Create Weights screenshot

Figure 3. Specifying the variables that identify stratum (VarStrat) and PSU (VarUnit). The BRR method of variance estimation is selected

In Figure 4, replicate weights have been created and are labeled RPL01-RPL24. The user can also type in a different prefix in the Create Weights screen.

WesVar Data File screenshot

Figure 4. Using the BRR method for creating replicate weights. From this screen the user saves the WesVar data file. In this case, the name Demo.var was used

Step 3 – Create a WesVar workbook and specify your analysis.

The user defines analysis requests in workbooks by selecting types of analyses and variables using the mouse. In Figure 5, the user has requested that the means of diastolic and systolic blood pressure be estimated.

WesVar WorkBook screenshot

Figure 5. Defining computed statistics for a table

Step 4 – Run the analysis and view the results.

Next, the user specifies that the means be calculated for each cell of a RACE x SEX table. The table will also contain the estimated total numbers of cases (Sum of Weights/Value) and the row, column, and total percentages for the estimated totals.

WesVar Workbook screenshot

Figure 6. Specifying the variables that define a table

Figure 7 shows the output screen with mean diastolic and systolic blood pressures for three RACE categories (White & other, Black, and Mexican American) crossed with SEX. Row and column marginals are shown as well as the overall means.

Table screenshot

Figure 7. Showing an output table with mean diastolic and systolic blood pressures by race and sex

Table Viewer Utility

Table Viewer is an easy-to-use tool for viewing, printing, and copying the output from one-way, two-way, and three-way tables that have previously been created using WesVar 5. Table Viewer presents the WesVar output in a grid that is easier to work with than the normal WesVar output, which produces one row for each cell of the user’s table request.

To view a table in Table Viewer, the only files necessary are name.wvb (the workbook file from WesVar) and name.001, name.002, etc. (the output files from tables run in WesVar). WesVar data files and the WesVar software itself are not required to view the tables. Note that the table requests in WesVar must be run to create the output files. Workbooks must be saved before the output can be viewed in Table Viewer.

When installing WesVar, the Table Viewer program and some example files are placed in the directory C:\Program Files\WesVar\tabview. To run Table Viewer, double-click on the executable in this directory or go to Start – Programs – WesVar – Launch Table Viewer.exe.

Relabel Utility

The Relabel utility consists of a SAS program and a standalone executable program. Taken together, these let one use information from a SAS format library to relabel the values of a WesVar data set that the user has previously imported from SAS, since WesVar does not keep labels when importing data.

When installing WesVar, the Relabel SAS program, standalone executable and Relabel instructions are placed in the directory C:\Program Files\WesVar\relabel. To view the instructions, double-click on ReadMe.html in this directory, or go to Start – Programs – WesVar – Relabel Instructions.

WesVar Frequently Asked Questions

  • A: Yes. The factor files have one record per replicate. The records must be in the same order as the physical order of the replicate weights on the input file used to create the data (VAR) file. For example, suppose your replicate weights are named RWT1-RWT100, but that they were sorted in alphanumeric order: RWT1, RWT10, RWT100, RWT11, etc. The factor files must be in this order also. Replicate weights are listed on the Attach Factors screen by their physical order in the data file. Both FPC factors and JKn factors must appear in this same order on the external files.

  • A: This message is issued in logistic regression when the convergence criterion for parameter estimates is not met in the specified maximum number of iterations. This could be caused by the following 1. The convergence criterion has been changed from difference in log-likelihood in version 3 to relative difference in log-likelihood in the current version. If you were a version 3 user, you may have to manually change the convergence criterion from 0.025 to 1E-6 in Preferences and in any version 3 workbook that you import into the current version. 2. You have few (or no) cases that have the characteristic being modeled in a cell. If your model contains a categorical independent variable, say RACE, and in replicate subsample 43 for RACE.1 there are no cases with the characteristic (dependent variable = 1), then the estimation algorithm will try to send the parameter estimate to negative infinity so that the predicted probability for RACE.1 is 0. In that case the parameter estimate will not converge but will get more and more negative at each iteration. 3. You may need to collapse categories for one of your independent variables to eliminate the problem. In the Regression Request/Output Control, check the boxes for Iteration History and Replicate Coefficients to get a detailed report on how the parameter estimates are changing. 

  • A: One alternative is to use the following code to create your SAS transport files. This is code for creating a SAS transport file (with a single member) named c:\export\wesvar.xpt from the sd2 file c:\input\data.sd2: options validvarname=v6; libname in1 ‘c:\input’; libname out1 xport ‘c:\export\wesvar.xpt’; proc copy in=in1 out=out1; select data; run; The statement “options validvarname=v6;” will cause SAS to generate unique 8-character names for variables with names longer than 8 characters. The VALIDVARNAME option is only valid using SAS Version 7 or later. It is not recognized (or needed) by earlier versions of SAS. 

  • A: SAS value labels are not imported in WesVar, even if they were originally created in WesVar and exported to SAS. Use the Relabel utility.

  • A: VARUNITS must be numbered consecutively starting at 1 in each VARSTRAT. The number of VARUNITS can differ from one VARSTRAT to another.

  • A: WesVar does not allow the JKn method to be used unless there are at least two PSUs in every stratum. To use the JKn method, you would have to collapse any stratum with one PSU with another stratum.

  • A: WesVar cannot read 64-bit SAS files. WesVar can only read 32-bit SAS files. The best way to ensure the data set is 32-bit is to specify the data set option OUTREP=WINDOWS_32 when creating the data set.

  • A: The U.S. Government Configuration Baseline (USGCB) is a security configuration mandated by the Office of Management and Budget (OMB) to standardize the configuration of desktop computers used by U.S. Government agencies. WesVar has been tested to verify compliance with the USGCB under Windows 7®, using a SCAP validated tool with USGCB Scanner capability. All WesVar components are fully functional and operate correctly as intended on systems using the USGCB under Windows 7. The standard installation, operation, maintenance, update, and/or patching of WesVar components does not alter the configuration settings from the approved USGCB configuration. WesVar uses the Windows Installer Service for installation to the default “program files” directory and is able to silently install and uninstall. All WesVar components are able to run in the standard user context without elevated system administration privileges. 

How can we help?

We welcome messages from job seekers, collaborators, and potential clients and partners.

Get in Contact

Want to work with us?

You’ll be in great company.

Explore Careers
Back to Top