Premium Essay


In: Religion Topics

Submitted By Smalls32
Words 1351
Pages 6
Importing an Excel Worksheet into SAS

Preparing Data for a Statistics Package: From Excel

How to Set up the Excel File:
Place the variable names in the first row. Be sure the names follow these rules: o variable names can be no more than 8 characters long o variable names must start with a letter o variable names may only have letters, numbers, or underscores in them o do not use following characters in variable names: %,$,#,@,!,+,*,~,",.,-,. o no blanks in variable names o be sure that each variable name is unique (no duplicate variable names) o be sure variable names are on the first row only! Only include the raw, un-summarized data. Delete extraneous data in your Excel file, like row or column totals, graphs, comments, annotations, etc. To prevent "ghost" rows and columns, copy only the raw data onto a new worksheet, and save from there.

Include a unique identifying number for each case. Sometimes you may have more than one identifier, such as Household ID and Subject ID; place these in separate columns. If you have several spreadsheets containing data on the same individuals, include their identifier(s) on each sheet.

Only include one value per cell. Don’t enter data such as "120/80" for blood pressure. Enter systolic blood pressure as one variable, and diastolic blood pressure as another variable. Don't enter data as "A,C,D" or "BDF" if there are three possible answers to a question. Include a separate column for each answer.

Don't leave blank rows or columns in the data.

Don’t mix numeric and character values (e.g. names and ID numbers) in the same column. While character variables are allowed in statistical packages, they are not as flexible as numeric variables, which are preferred. Use numeric values when feasible.

Date values are best entered in three columns: one for…...

Similar Documents