It is also possible to run the program directly by preparing a command file, which specifies the variables to be analyzed and the options to use. This document explains how to prepare such a file. The name of this batch command file is specified to the program after the ‘-b’ option flag.

Keyword Possible Specification Default (if no keyword) _____________________________________________________________________STUdy= path of dataset directory Look for variables in current directory only SAvefile= filename to receive output Output sent to screen (overwrite existing file) (standard output)Variable SpecificationsDEPendent= variables name(s) REQUIRED (separated by spaces/commas) ROWvar= variable name(s) REQUIRED (separated by spaces/commas) COLUMNvar= variable name(s) No column variable CONtrolvar= variable name(s) No control variable Weight= name of weight variable No weighting Filter= name(s) and codes of filter No filter variable(s) GVARCase= LOWER or UPPER No force to lower/upper case STRatum= name of variable giving No stratification for sample stratum computing standard errors $1: Force one stratum CLuster= name of variable giving No cluster variable for sample cluster computing standard errorsGeneral OptionsCOLORcoding= Yes No color coding of cells or colored headings LAnguagefile= pathname of file with English labels on non-English labels output NOTABle= Yes (to suppress tables of Display the tables means, confidence intervals, and diagnostic information but still get other info) TExt= Yes No text for variables RUNtitle= title or comments for run No title or comments

Instead of displaying the main statistic directly, it is possible to display the DIFFERENCE from something else, by adding the ‘difference=’ keyword. The difference for each cell can be the difference between the cell mean and either the overall mean, the mean in the same column of a specified row, or the mean in the same row of a specified column. If a row or column difference is requested, you must also specify the BASE CATEGORY to use for the comparison.

For differences between a specified row or column, it is possible
to obtain the ** average of the differences, **
instead of the difference in the marginal column or row. This
option is set in the
general section of the HARC file
by setting XMEANS=YES.

For each statistic the user can specify the number of desired decimal places (in parentheses, after the name of the statistic). See below for the default number of decimals for each statistic.

Keyword Possible Specification Default (if no keyword) _____________________________________________________________________MAINstat= MEANs (ndec) Display means, with TOTALs (ndec) two decimal places LOgit (ndec) PRobit (ndec) LP (ndec) DIFference= Overall (ndec) Display main statistic Row (ndec) Column (ndec) BASEcat= code for comparison row/column REQUIRED for row/column differences AVGDiffs= Yes No average differences from a row or column are displayed

Keyword Possible Specification Default (if no keyword) _____________________________________________________________________OTHERSTats= SER (ndec) No standard errors for simple random sample ZSTATistic (ndec) No Z- or T-statistics P (ndec) No p-value (diffs from a row or col) SD (ndec) No standard deviations Ncases No unweighted N’s WNcases (ndec) No weighted N’s(for complex samples only)SEC (ndec) No standard errors for complex sample design DEFT (ndec) No design effect(for cluster samples only)RHO (ndec) No cluster coefficient

An ANOVA table can be produced. For simple random samples the ANOVA table and an F-test is produced. For complex samples the F-test is omitted and the only output is the eta-squared statistics, which show descriptively the proportion of the variance of the dependent variable that is explained by the row and column variables and their interaction.

A table with the upper and lower bounds of the confidence interval for the mean (or total or differenc or difference) in each cell can be produced. The default level of confidence is the 95 percent level, but the 90 or 99 percent levels can also be specified (in parentheses). The number of decimal places displayed will be the same as requested for the means. If both complex and SRS standard errors have been requested, only the complex standard errors are used for the confidence intervals.

For complex samples, a table with diagnostic information in each cell can also be produced.

A multiple classification analysis (MCA) can be carried out. The default number of decimals is 3, but another number of decimal places can be specified.

Briefly, the variables will cycle in the following order: control, column, row, dependent. All of the tables will be produced using the same weight, filters, and other options.

study = /archive/nes84 dep = vardep row = var1 column = var3 otherstats = ncases anova = yes savefile = mymeans.htm

study = /archive/nes84 dep = vardep1 vardep2 row = var1(1-9) var2 var3(0-9) column = var3, var4 weight= wtvar filters= var21(1-3) var30(1) otherstats = se, ncases anova savefile = mymeans.htm

study = /archive/nes94 dep = vote row = party column = sex diffs = col(3) basecat = 1 otherstats = se ncases anova text runtitle= Test run to demonstrate batch mode savefile= mymeans.htm

study = /archive/nes94 dep = vote row = party column = sex stratum = stratvar cluster = psuvar otherstats = sec ser deft rho ncases othertables = confidence diagnostics savefile= mymeans.htm

study = /sa/sdatest dep = vardep row = var1 column = var3 savefile = mymeans.htm tblproperties = /sa/charts/mychartspecs ch_url=http://sda.berkeley.edu/chartgen ch_color = yes ch_showmeans= yes

CSM, UC Berkeley

April 12, 2011