Você está na página 1de 48

Introduo ao SPSS

Aplicao aos Microdados Educacionais

Introduo ao SPSS Aplicao aos Microdados Educacionais

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

1. Conhecendo o SPSS

1.1 - Telas Iniciais


1.2 - Barra de Ferramentas
1.3 Menus
1.4 Abrindo Bases de Dados
1.5 Salvando Bases de Dados

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

1.1 - Telas Iniciais

Nome do Arquivo
Variveis

Casos
Base
Visualizador de Dados e Variveis

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

1.1 - Telas Iniciais

Menus
Barra de Ferramentas
Seleo e valor
Barra de Status

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

1.1 - Telas Iniciais

Name: nome da varivel


Type: Numeric, String
Width: tamanho das observaes
Decimals: casas decimais
Labels: descrio do name

Values: descrio dos valores


Missing: valores perdidos
Columns: tamanho das colunas
Align: alinhamento
Measure: nominal, ordinal, escalar

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

1.2 Barra de Ferramentas

Abrir
Salvar
Imprimir
Comandos Recentes
Retornar
Seguir
Localizar observaes
Localizar Variveis
Variveis

Localizar e Substituir
Inserir observaes
Inserir variveis
Split files: separar a base
Weight cases: peso
Select cases: seleciona a base
Value labels: descrio dos valores
Conjunto de variveis
Todas as variveis

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

1.3 - Menus
File: new (data, syntax, output,
script), open, close, save,
save as, Read text data...

Data: identify duplicate cases,


sort, split file, select cases,
weight cases

Edit : cut, copy, paste, clear,


find, replace, insert, go

Tranform: compute, recode,


count values

View: status bar, toolbars,


fonts, value labels, data,
variables

Analyze: descriptives
(frequencies, descriptives,
crosstabs)

Help: topics, tutorial, case studies

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

1.4 Abrindo Bases de Dados

O SPSS pode abrir base em diferentes


formatos

SPSS (. Sav), Excel (.xls), Text (.txt ou .dat) Stata (.dta)

Na maioria das vezes, utiliza-se sintaxes de


INPUT
Pode-se abrir as bases de dados de diferentes
maneiras

Menus: File -> Open -> Data


Barra de Ferramental:
Sintaxes de INPUTS

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

1.4 Abrindo Bases de Dados


Exemplo 1: base accidents.sav
File -> Open -> Data =>
...Arquivos de programas\SPSSInc\SPSS16\Samples\accidents.sav

File -> New ->Syntax=>


GET FILE='C:\Arquivos de programas\
\SPSSInc\SPSS16\Samples\accidents.sav'.

Exemplo 2: base CENSOESC_2006.txt


File -> Open -> Syntax =>
...\Microdados do Censo Escolar 2006\
\INPUTS_SAS_SPSS\INPUT_SPSS_CENSOESC2006.sps

OBs.: substitua o endereo.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

10

1.4 Abrindo Bases de Dados


Sintaxe de INPUTS
FILE HANDLE CENSOESC_2006 NAME = 'C:\Documents and Settings\
\Microdados do Censo Escolar 2006\
\DADOS\CENSOESC_2006\CENSOESC_2006.TXT'
/MODE = CHARACTER /LRECL=43742.
DATA LIST FIXED
FILE = CENSOESC_2006
/MASCARA
1-8
ANO
9-13
CODMUNIC
14-25 (F2)
UF
26-75
(A)
SIGLA
76-77 (A)
MUNIC
78-127 (A)
DEP
128-137(A)
...
EXECUTE.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

11

1.4 Abrindo Bases de Dados


Exemplo 3: base spaece_qprof_04l.txt
File -> Open -> Data =>
SPAECE\SPAECE 04\spaece04_qprof\ base
spaece_qprof_04l.txt

Text import wizard


Delimited / Fixed width
Names at the top
Delimiters between variables
(tab, comma, space, semicolon, others)
Data format

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

12

1.5 Salvando Base de Dados

O SPSS pode salvar a base em diferentes


formatos

SPSS (. Sav), Excel (.xls), Text (.txt ou .dat), Stata


(.dta)

Pode-se salvar as bases de dados de


diferentes maneiras

Menus: File -> Save ou Save as


Barra de Ferramental:
Sintaxes (KEEP, DROP)

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

13

1.5 Salvando Base de Dados

Exemplo 1

SAVE OUTFILE='C:\Arquivos de programas


\SPSSInc\SPSS16\Samples\accidents.sav'
/COMPRESSED.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

14

2. Principais Comandos
2.1 Organizando a Base
identify duplicate cases, sort, split file, select cases,
weight cases, clear, insert, rename, label, merge

2.2 Modificando a Base


Compute (IF), recode

2.3 Tabelas Descritivas


frequencies, descriptives, crosstabs

2.4 Principais Comandos

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

15

2.1 Organizando a Base

Identify duplicate cases: identifica os dados repetidos,


criando uma nova varivel, e ordena os dados.

Exemplo: Data -> Identify duplicate cases

Define matching cases


Sort within matching groups

Sort: ordena ascendentemente ou descendentemente os


dados.

Exemplo: Data -> Sort

Sort by
Sort order

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

16

2.1 Organizando a Base

Split file: cria um filtro para reorganizar a base de dados, no deixando


nenhuma das partes inacessveis.
Exemplo: Data -> Split file

Compare Groups
Organize output by group

Select cases: cria um filtro para separar provisria ou definitivamente a


base de dados, tornando alguma das partes inacessveis.
Exemplo: Data -> Select cases
If condition is satisfied
Random sample

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

17

2.1 Organizando a Base


Operadores Relacionais
EQ or =

Equal to

NE or ~= or = or <>

Not equal to

LT or <

Less than

LE or <=

Less than or equal to

GT or >

Greater than

GE or >=

Greater than or equal to

Operadores Lgicos
AND or &

Both relations must be true

OR or |

Either relation can be true

NOT

Reverses the outcome of an


expression

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

18

2.1 Organizando a Base

Weight cases: atribui uma varivel que serve de peso para uma
amostra.
Exemplo: Data -> Weight cases

Clear: deleta colunas (variveis) ou linhas (casos).


Data view -> Boto direito.

Insert: insere colunas ou linhas.


Data view -> Boto direito.
Rename e Variables Label: substitui o nome e o label das variveis.
Variable view.
Values Label: insere informaes sobre as observaes.
Variable view.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

19

2.1 Organizando a Base

Merge: junta duas ou mais bases de dados,


adicionando casos ou variveis.

Exemplo: Data -> Merge Files -> Add Cases


Add Variable

As variveis de identificao devem estar ordenadas em


ambas os arquivos.
No pode haver identificao duplicada quando se adiciona
casos.
No pode haver identificao duplicada na base ativa.
Determine o arquivo que tem a identificao chave.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

20

2.2 Modificando a Base

Compute: cria novas variveis utilizando funes ou


operadores.

Example: Tranformations -> Compute

Target Variable
Numeric expression
IF

Exerccio
Elejam as 5 mais importantes funes dos grupos e apresente
um exemplo:
Arithimetic; Missing Values; Statistical; String.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

21

2.2 Modificando a Base

Arithimetic

1 2 3 4 5 -

Missing Values

1 2 3 4 5 -

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

22

2.2 Modificando a Base

Statistical

1 2 3 4 5 -

String

1 2 3 4 5 -

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

23

2.2 Modificando a Base

Recode: modifica ou cria uma nova varivel.

Exemplo: Tranformation -> Recode into Same Variable


Recode into Different Variable

Output Variable (Name, Label)


IF

SYSMIS (.)
MISSING ( )
ELSE
Thru -> through
Lowest (LO), Highest (HI)
Copy

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

24

2.3 Tabelas Descritivas

Frequencies: apresenta as freqncias das variveis e


vrias estatsticas descritivas.

Exemplo: Analyze -> Descriptive statistics -> Frequencies...


Statistics

Charts

N (Valid, Missing)

Skewness

Mean

Kurtosis

Std. Error of Mean

Range

Median

Minimum

Mode

Maximum

Std. Deviation

Sum

Variance

Percentiles

None
Bar Charts
Pie Charts
Histogram

Exerccio
Definam todas as estatsticas e os tipos de grficos.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

25

2.3 Tabelas Descritivas

Descriptives: apresenta estatsticas descritivas das


variveis.

Exemplo: Analyze -> Descriptive statistics ->


Descriptives...

Save standardized value as variable


Options
Mean

Skewness

Sum

Kurtosis

Std. Deviation

Range

Variance

Minimum

S. E. Mean

Maximum

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

26

2.3 Tabelas Descritivas

Crosstabs: gera tabelas com dados cruzados de duas ou mais variveis e


algumas estatsticas da relao entre as variveis.

Exemplo: Analyze -> Descriptive statistics -> Crosstabs...

Rows
Columns
Layer 1 to 1
Statistics

Chi-squared
Correlation

Cells

Counts (Observed, Expected)


Pecentages (Rows, Columns, Total)

Exerccio
Definam as estatsticas Chi-squared e Correlation.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

27

2.4 Principais Comandos


Principais Comandos do SPSS
Comandos

Traduo

Significado

Sintaxe

1
2
3
4
5
6
7
8
9
10

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

28

3. Elaborando Sintaxes
3.1 Pontos principais
3.2 Comandos
sort, split file, select cases, weight cases,
merge, rename, compute (IF), recode

3.3 Tabelas Descritivas


frequencies, descriptives, crosstabs

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

29

3.1 Pontos principais

Os comandos em uma sintaxe so instrues que devem seguir


certas regras. As principais so:
O asterisco ( * ) serve para fazer anotaes ou tornar
inoperante uma linha da programao;
O ponto final ( . ) determina o fim da linha de comando;
Os comando, subcomandos e funes so representados por
letras maisculas (LABEL VARIABLES);
Os elementos representados em letra minscula devem ser
inseridos (varlist);
Os elementos em negritos so defauts;
Parenteses ( ( ) ), apostrofos ( ) e aspas ( ) so
requerimentos para executar a sintaxe;
Elementos entre chaves ( { } ) indicam alternativas;
Elementos entre colchetes ( [ ] ) so especificaes opcionais;
As abreviaes so bvias (varname, varlist).

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

30

3.2 Comandos

Sort: ordena ascendentemente ou


descendentemente os dados.

SORT CASES [BY] varlist[({A})] [varlist...]

{D}

Exemplo:

SORT CASES BY gender(A) accid(A).

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

31

3.2 Comandos

Split file: cria um filtro para reorganizar a base de dados,


no deixando nenhuma das partes inacessveis.

SPLIT FILE {OFF } [{LAYERED }] {BY varlist}


{SEPARATE}

Exemplo

SPLIT FILE LAYERED BY gender.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

32

3.2 Comandos

Select cases: cria um filtro para separar provisria ou


definitivamente a base de dados, tornando alguma
das partes inacessveis.

SELECT IF [(]logical expression[)]


Exemplo
USE ALL.
COMPUTE filter_$=(gender = 1 & agecat > 1).
VARIABLE LABEL filter_$ 'gender = 1 & agecat > 1 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMAT filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

33

3.2 Comandos
Operadores Relacionais
EQ or =

Equal to

NE or ~= or = or <>

Not equal to

LT or <

Less than

LE or <=

Less than or equal to

GT or >

Greater than

GE or >=

Greater than or equal to

Operadores Lgicos
AND or &

Both relations must be true

OR or |

Either relation can be true

NOT

Reverses the outcome of an


expression

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

34

3.2 Modificando a Base

Compute: cria novas variveis utilizando


funes ou operadores.
COMPUTE target variable=expression

Exemplo

IF (agecat <= 2) taxa=accid / pop.


EXECUTE.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

35

3.2 Modificando a Base

Recode: modifica ou cria uma nova varivel.


RECODE varlist (value list=value)...(value list=value) [INTO varlist]

Exemplo

RECODE agecat (1 2=1) (ELSE=0) INTO menor.


VARIABLE LABELS menor 'Menor de 25'.
VALUE LABELS menor 1 menor 0 caso contrrio.
EXECUTE.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

36

3.3 Tabelas Descritivas

Frequencies: apresenta as frequncia das variveis


e vrias estatsticas descritivas.

Sintaxe

FREQUENCIES VARIABLES=varlist [varlist...]


[/NTILES=n]
[/PERCENTILES=value list]
[/STATISTICS=[DEFAULT] [MEAN] [STDDEV] [MINIMUM]
[MAXIMUM]
[SEMEAN] [VARIANCE] [RANGE] [MODE] [MEDIAN] [SUM] [ALL]
[NONE]] [/ORDER=[{ANALYSIS}] [{VARIABLE}]

Exemplo

FREQUENCIES VARIABLES=agecat gender accid pop


/NTILES=4
/STATISTICS=STDDEV VARIANCE RANGE MINIMUM MAXIMUM
SEMEAN
/ORDER=ANALYSIS.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

37

3.3 Tabelas Descritivas

Descriptives: apresenta estatsticas descritivas das


variveis.
DESCRIPTIVES VARIABLES= varname[(zname)] [varname...]
[/STATISTICS=[DEFAULT**] [MEAN**] [MIN**] [SKEWNESS]]
[STDDEV** ] [SEMEAN] [MAX**] [KURTOSIS] [VARIANCE ] [SUM ]
[RANGE] [ALL]

Exemplo
DESCRIPTIVES VARIABLES=gender accid pop
/STATISTICS=MEAN STDDEV MIN MAX.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

38

3.3 Tabelas Descritivas

Crosstabs: gera tabelas com dados cruzados de duas ou mais


variveis e algumas estatsticas da relao entre as variveis.
CROSSTABS [TABLES=]varlist BY varlist [BY...] [/varlist...]
[/CELLS=[{COUNT**}] [ROW ] [EXPECTED [COLUMN]
[TOTAL ]
[/STATISTICS=[CHISQ] [CC]

Exemplo

CROSSTABS
/TABLES=gender BY pop BY agecat
/FORMAT=AVALUE TABLES
/STATISTICS=CHISQ CORR
/CELLS=COUNT TOTAL
/COUNT ROUND CELL.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

39

4. Bases de dados
4.1
3.2
3.3
3.4
3.5

PNAD
Censo Escolar
Prova Brasil
SAEB
- SPAECE

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

40

4.__ Base ________________

Arquivos dos Microdados

Nome do Arquivo

Nvel

Tamanho

Formato

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

41

4.__ Base ________________

Arquivos de IMPUT

Nome do Arquivo

Nvel

Formato

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Introduo ao SPSS Aplicao aos Microdados Educacionais

42

4.__ Base ________________

Variveis Identificadoras e Pesos

Nome do Arquivo

Nvel

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

43

4.__ Base ________________

Principais Variveis

Nome

Descrio

Nvel

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

44

4.__ Base ________________


Principais Variveis
Descrio
Nome

Nvel

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

45

4.__ Base ________________


Tabela Descritiva

Edies
Amostra
Populao
Estratos
Percentuais

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

46

Exerccio Final

Faa uma apresentao sobre uma das


bases com 5 tabelas e indicadores que achar
mais importante.
Tente aplicar o maior nmero de comandos.
Crie uma Sintaxe.

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

Introduo ao SPSS Aplicao aos Microdados Educacionais

47

Principais Comandos do SPSS


Comando

Traduo

Descrio

Sintaxe

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

Introduo ao SPSS Aplicao aos Microdados Educacionais

48