Click here to load reader

Introducao SPSS

  • View
    257

  • Download
    0

Embed Size (px)

Text of Introducao SPSS

Introduo ao SPSS Aplicao aos Microdados Educacionais

Introduo ao SPSS Aplicao aos Microdados Educacionais

1

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

Introduo ao SPSS Aplicao aos Microdados Educacionais

2

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

3

1.1 - Telas Iniciais

Nome do Arquivo Variveis

CasosBase Visualizador de Dados e Variveis

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

Introduo ao SPSS Aplicao aos Microdados Educacionais

4

1.1 - Telas Iniciais

Menus Barra de Ferramentas Seleo e valor Barra de Status

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

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

6

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

7

1.3 - MenusFile: new (data, syntax, output, script), open, close, save, save as, Read text data... Edit : cut, copy, paste, clear, find, replace, insert, go View: status bar, toolbars, fonts, value labels, data, variables Data: identify duplicate cases, sort, split file, select cases, weight cases Tranform: compute, recode, count values Analyze: descriptives (frequencies, descriptives, crosstabs)

Help: topics, tutorial, case studies

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

Introduo ao SPSS Aplicao aos Microdados Educacionais

8

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 9

1.4 Abrindo Bases de DadosExemplo 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 INPUTSFILE 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 DadosExemplo 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 Comandos2.1 Organizando a Baseidentify duplicate cases, sort, split file, select cases, weight cases, clear, insert, rename, label, merge

2.2 Modificando a BaseCompute (IF), recode

2.3 Tabelas Descritivasfrequencies, 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 BaseOperadores Relacionais EQ or = Equal to

NE or ~= or = or LT or < LE or GE or >=

Not equal toLess than Less than or equal to Greater than Greater than or equal to

Operadores Lgicos AND or & OR or | NOT Both relations must be true Either relation can be true 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

Arithimetic1 2 3 4 5 -

Missing Values1 2 3 4 5 -

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

Introduo ao SPSS Aplicao aos Microdados Educacionais

22

2.2 Modificando a Base

Statistical1 2 3 4 5 -

String1 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 ChartsSkewness

N (Valid, Missing)

MeanStd. Error of Mean Median Mode Std. Deviation Variance

KurtosisRange Minimum Maximum Sum 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 OptionsMean Sum Std. Deviation Variance S. E. Mean Skewness Kurtosis Range Minimum 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 Counts (Observed, Expected) Pecentages (Rows, Columns, Total)

Cells

ExerccioDefinam as estatsticas Chi-squared e Correlation.

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

Introduo ao SPSS Aplicao aos Microdados Educacionais

27

2.4 Principais ComandosPrincipais Comandos do SPSSComandos 1 2 3 4 5 6 7 8 9 10 Traduo Significado Sintaxe

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

Introduo ao SPSS Aplicao aos Microdados Educacionais

28

3. Elaborando Sintaxes3.1 Pontos principais 3.2 Comandossort, split file, select cases, weight cases, merge, rename, compute (IF), recode

3.3 Tabelas Descritivasfrequencies, 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 ComandosOperadores Relacionais EQ or = Equal to

NE or ~= or = or LT or < LE or GE or >=

Not equal toLess than Less than or equal to Greater than Greater than or equal to

Operadores Lgicos AND or & OR or | NOT Both relations must be true Either relation can be true 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=expressionExemplo

IF (agecat