home | schedules | software | help | who we are | about | workshops | links | data access | contact us | print version

AMT home page ITS home page Yale Front Door Contact us Search Yale Statlab

<  July 2008 >
(Leap Year)
Su Mo Tu We Th Fr Sa
    1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

Reserve a classroom


Schedule for
07/03/2008


Main Lab
140 Prospect St.
Room 101
No Events Today

Brewster Hall
124 Prospect St.
Room B-13
No Events Today

Consultant's Desk
140 Prospect St.
Room 100
10am- 1:30pm Matt Johnson
1:30- 5pm Kyle Hood


schedules

software

help

who we are

data access

about

workshops

links

DBMS/COPY FAQ

Why do some of the numeric variables became character variables when I convert a spreadsheet into SAS, SPSS, Minitab, etc.?

A spreadsheet can have numeric values and character values in one column, a variable in a statics software is either numeric or character type. So, when converting a spreadsheet DBMS/COPY has to assign the variable type of a data column.
If there is just one character in a column, like a blank in a cell you wanted to mark as empty, DBMS/COPY assignes the variable resulting from this column the type Character.

To avoid this problem, make sure that you only type numbers in a column of a numeric variable. Don't type anything in cells with missing values, just skip them.
If you work with a big spreadsheet, it is hard to figure out, which cell causes the type Character in your variable.

To convert the variable type:

SAS

Let VAR_CHAR be a variable of type character in the dataset OLD, we want to convert it into a numeric variable VAR_NUM
     DATA new;
       SET old;
       VAR_NUM=0;
       VAR_NUM=VAR_CHAR;
     RUN:
The LOG window displays some error message for those values of VAR_CHAR which were non-numeric, like the blank. Just ignore it.

SPSS for Windows

Select Transform > Compute Variable
As Target Variable define a new variable. in Numeric Expression write NUMBER(VAR_CHAR,f8)

©2007 Yale University
Social Science Statistical Laboratory
Certifying Authority: Themba Flowers
lm: Wed Apr 09 15:45:19 EDT 2003