SlideShare a Scribd company logo
1 of 34
GAP Toolkit 5
Training in basic drug abuse data management
and analysis
Training session 7
SPSS: Recode and Compute
Objectives
• To introduce and demonstrate SPSS tools for recoding
variables and creating new variables
• To introduce and demonstrate the use of SPSS
command syntax
• To introduce and demonstrate Help features in SPSS
from a dialogue box
Types of recode
• A categorical variable into a new set of categories
• A continuous variable into a categorical variable
Recode approaches
• Into pre-defined categories of interest
• Into categories of equal size
Example: pre-defined categories
• Recode weekly expenditure on drugs into the following
categories:
– Low expenditure <= £100 a week
– High expenditure >= £101 a week
select variable for
recoding and click
click here to map
old  new values
Frequency Percent Valid
percent
Cumulative
percent
Valid Low 31 62.0 62.0 62.0
High 19 38.0 38.0 100.0
Total 50 100.0 100.0
Weekly drug expenditure
Example: quantiles
• Recode weekly expenditure into the following:
– 4 categories, each with approximately the same number of
cases (quartiles)
– 10 categories, each with approximately the same number of
cases (deciles)
Frequency Percent Valid percent Cumulative percent
Valid <=£90 12 24.0 24.0 24.0
£91 <= X <= £98 12 24.0 24.0 48.0
£99 <= X <= £105 13 26.0 26.0 74.0
£106 <= X >= £116 13 26.0 26.0 100.0
Total 50 100.0 100.0
NTILES of Expend
Frequency Percentage Valid percentage Cumulative
percentage
Valid 1 5 10.0 10.0 10.0
2 4 8.0 8.0 18.0
3 7 14.0 14.0 32.0
4 4 8.0 8.0 40.0
5 4 8.0 8.0 48.0
6 6 12.0 12.0 60.0
7 5 10.0 10.0 70.0
8 5 10.0 10.0 80.0
9 6 12.0 12.0 92.0
10 4 8.0 8.0 100.0
Total 50 100.0 100.0
NTILES of EXPEND
Compute
• Creates new variables using:
– Standard mathematical operators
– A full range of functions
– Conditional statements
Transform/Compute
click here to define variable type
Type and Label
Yexpend=Expend*52
Explore: Yexpend
Statistic Std. error
Yearly drug expenditure Mean 5062.72 77.468
95% Confidence Interval
for Mean
Lower Bound 4907.04
Upper Bound 5218.40
5% Trimmed Mean 5072.89
Median 5148.00
Variance 300062.3
Std. Deviation 547.779
Minimum 3848
Maximum 6032
Range 2184
Interquartile Range 754.00
Skewness -.333 .337
Kurtosis -.446 .662
Descriptives
Example 2: Age
• Convert date of birth to age in years
(DATE.DMY(01,01,2002) - dob) / (365.25*24*60*60)
Explore: Age
Statistic Std. error
AGE Mean 25.43 1.219
95% Confidence Interval
for Mean
Lower Bound 22.97
Upper Bound 27.88
5% Trimmed Mean 25.21
Median 22.84
Variance 72.867
Std. Deviation 8.536
Minimum 11
Maximum 44
Range 32
Interquartile Range 12.77
Skewness .579 .340
Kurtosis -.518 .668
Descriptives
Help
• Context-sensitive Help:
– Right click on any part of a dialogue box to obtain help
• Dialogue box Help button
Command language
• Command-line rather than Windows interface
• More flexible
• Reusable
• Saved as text files
Syntax window
• Enter SPSS commands:
– Type directly
– Paste from a dialogue box
• Run SPSS commands
• Save as a text file
The Paste button
click to copy command
into Syntax Window
The Run menu
Syntax for Age
Summary
• Recode:
– Into same variable
– Into different variable
• Compute:
– Mathematical operators
– Functions
• Dialogue box Help:
– Context-sensitive Help
– Dialogue box Help button
• Command language:
– Syntax Window
– Dialogue box Paste button

More Related Content

Similar to trs-7.ppt

QM-032-SQC tool application
QM-032-SQC tool applicationQM-032-SQC tool application
QM-032-SQC tool applicationhandbook
 
hspring07-085bk
hspring07-085bkhspring07-085bk
hspring07-085bkWinter Liu
 
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docx
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docxRequired ResourceTextSchneider, A. (2017). Managerial Accounti.docx
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docxaudeleypearl
 
Capacity planning ppt @ bec doms
Capacity planning ppt @ bec domsCapacity planning ppt @ bec doms
Capacity planning ppt @ bec domsBabasab Patil
 
OL 325 Milestone Three Guidelines and Rubric Section
 OL 325 Milestone Three Guidelines and Rubric  Section OL 325 Milestone Three Guidelines and Rubric  Section
OL 325 Milestone Three Guidelines and Rubric SectionMoseStaton39
 
Week 2 Individual Assignment 2 Quantitative Analysis of Credit - .docx
Week 2 Individual Assignment 2 Quantitative Analysis of Credit - .docxWeek 2 Individual Assignment 2 Quantitative Analysis of Credit - .docx
Week 2 Individual Assignment 2 Quantitative Analysis of Credit - .docxjessiehampson
 
Research and Advicemonster Deep Dive - July 2019: Session Two
Research and Advicemonster Deep Dive - July 2019: Session TwoResearch and Advicemonster Deep Dive - July 2019: Session Two
Research and Advicemonster Deep Dive - July 2019: Session TwoQuality Product Research Limited
 
Bayesian Approaches To Improve Sample Size Webinar
Bayesian Approaches To Improve Sample Size WebinarBayesian Approaches To Improve Sample Size Webinar
Bayesian Approaches To Improve Sample Size WebinarnQuery
 
Pharmacoeconomics - 2020_New.pptx
Pharmacoeconomics - 2020_New.pptxPharmacoeconomics - 2020_New.pptx
Pharmacoeconomics - 2020_New.pptxHamadAlshabi
 
MATH 106 QUIZ 6NAME _____ _________________ Professor Dr. K.docx
MATH 106 QUIZ 6NAME _____ _________________  Professor Dr. K.docxMATH 106 QUIZ 6NAME _____ _________________  Professor Dr. K.docx
MATH 106 QUIZ 6NAME _____ _________________ Professor Dr. K.docxandreecapon
 
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...Smarten Augmented Analytics
 
Statistical Learning and Model Selection (1).pptx
Statistical Learning and Model Selection (1).pptxStatistical Learning and Model Selection (1).pptx
Statistical Learning and Model Selection (1).pptxrajalakshmi5921
 
Lecture 7 guidelines_and_assignment
Lecture 7 guidelines_and_assignmentLecture 7 guidelines_and_assignment
Lecture 7 guidelines_and_assignmentDaria Bogdanova
 
Data Insight Leaders Summit Barcelona 2017
Data Insight Leaders Summit Barcelona 2017Data Insight Leaders Summit Barcelona 2017
Data Insight Leaders Summit Barcelona 2017Harvinder Atwal
 

Similar to trs-7.ppt (20)

1030 track3 boire
1030 track3 boire1030 track3 boire
1030 track3 boire
 
1000 track2 boire
1000 track2 boire1000 track2 boire
1000 track2 boire
 
QM-032-SQC tool application
QM-032-SQC tool applicationQM-032-SQC tool application
QM-032-SQC tool application
 
hspring07-085bk
hspring07-085bkhspring07-085bk
hspring07-085bk
 
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docx
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docxRequired ResourceTextSchneider, A. (2017). Managerial Accounti.docx
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docx
 
Capacity planning ppt @ bec doms
Capacity planning ppt @ bec domsCapacity planning ppt @ bec doms
Capacity planning ppt @ bec doms
 
OL 325 Milestone Three Guidelines and Rubric Section
 OL 325 Milestone Three Guidelines and Rubric  Section OL 325 Milestone Three Guidelines and Rubric  Section
OL 325 Milestone Three Guidelines and Rubric Section
 
Week 2 Individual Assignment 2 Quantitative Analysis of Credit - .docx
Week 2 Individual Assignment 2 Quantitative Analysis of Credit - .docxWeek 2 Individual Assignment 2 Quantitative Analysis of Credit - .docx
Week 2 Individual Assignment 2 Quantitative Analysis of Credit - .docx
 
Quotemonster roadshow session two June 2019
Quotemonster roadshow session two June 2019Quotemonster roadshow session two June 2019
Quotemonster roadshow session two June 2019
 
Research and Advicemonster Deep Dive - July 2019: Session Two
Research and Advicemonster Deep Dive - July 2019: Session TwoResearch and Advicemonster Deep Dive - July 2019: Session Two
Research and Advicemonster Deep Dive - July 2019: Session Two
 
Bayesian Approaches To Improve Sample Size Webinar
Bayesian Approaches To Improve Sample Size WebinarBayesian Approaches To Improve Sample Size Webinar
Bayesian Approaches To Improve Sample Size Webinar
 
Pharmacoeconomics - 2020_New.pptx
Pharmacoeconomics - 2020_New.pptxPharmacoeconomics - 2020_New.pptx
Pharmacoeconomics - 2020_New.pptx
 
MATH 106 QUIZ 6NAME _____ _________________ Professor Dr. K.docx
MATH 106 QUIZ 6NAME _____ _________________  Professor Dr. K.docxMATH 106 QUIZ 6NAME _____ _________________  Professor Dr. K.docx
MATH 106 QUIZ 6NAME _____ _________________ Professor Dr. K.docx
 
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
 
Statistical Learning and Model Selection (1).pptx
Statistical Learning and Model Selection (1).pptxStatistical Learning and Model Selection (1).pptx
Statistical Learning and Model Selection (1).pptx
 
Notes 3-6
Notes 3-6Notes 3-6
Notes 3-6
 
DA-Module 1.pptx
DA-Module 1.pptxDA-Module 1.pptx
DA-Module 1.pptx
 
Strategic approachppg v02
Strategic approachppg v02Strategic approachppg v02
Strategic approachppg v02
 
Lecture 7 guidelines_and_assignment
Lecture 7 guidelines_and_assignmentLecture 7 guidelines_and_assignment
Lecture 7 guidelines_and_assignment
 
Data Insight Leaders Summit Barcelona 2017
Data Insight Leaders Summit Barcelona 2017Data Insight Leaders Summit Barcelona 2017
Data Insight Leaders Summit Barcelona 2017
 

More from Gurumurthy B R

Gas Chromatography.ppt
Gas Chromatography.pptGas Chromatography.ppt
Gas Chromatography.pptGurumurthy B R
 
American Revolutionppt.ppt
American Revolutionppt.pptAmerican Revolutionppt.ppt
American Revolutionppt.pptGurumurthy B R
 
ZP394sample_ImmigrationPP.ppt
ZP394sample_ImmigrationPP.pptZP394sample_ImmigrationPP.ppt
ZP394sample_ImmigrationPP.pptGurumurthy B R
 
Immigrants in America.ppt
Immigrants in America.pptImmigrants in America.ppt
Immigrants in America.pptGurumurthy B R
 
Lesson 3 American History - 1800 through the Civil War(1).pptx
Lesson 3 American History - 1800 through the Civil War(1).pptxLesson 3 American History - 1800 through the Civil War(1).pptx
Lesson 3 American History - 1800 through the Civil War(1).pptxGurumurthy B R
 
سادسةHistory_of_USA.ppt
سادسةHistory_of_USA.pptسادسةHistory_of_USA.ppt
سادسةHistory_of_USA.pptGurumurthy B R
 
SJSUIntroSocTischlerChap8PPT.ppt
SJSUIntroSocTischlerChap8PPT.pptSJSUIntroSocTischlerChap8PPT.ppt
SJSUIntroSocTischlerChap8PPT.pptGurumurthy B R
 
GeographyReview29_3Poverty.pptx
GeographyReview29_3Poverty.pptxGeographyReview29_3Poverty.pptx
GeographyReview29_3Poverty.pptxGurumurthy B R
 
CPRReportLaunch-Presentation-Sweden-010914-2.pptx
CPRReportLaunch-Presentation-Sweden-010914-2.pptxCPRReportLaunch-Presentation-Sweden-010914-2.pptx
CPRReportLaunch-Presentation-Sweden-010914-2.pptxGurumurthy B R
 
03-12-13Child Poverty.ppt
03-12-13Child Poverty.ppt03-12-13Child Poverty.ppt
03-12-13Child Poverty.pptGurumurthy B R
 
DOC 12A Gender_Poverty -ECLAC.ppt
DOC 12A Gender_Poverty -ECLAC.pptDOC 12A Gender_Poverty -ECLAC.ppt
DOC 12A Gender_Poverty -ECLAC.pptGurumurthy B R
 

More from Gurumurthy B R (20)

basic_rules.ppt
basic_rules.pptbasic_rules.ppt
basic_rules.ppt
 
3D_Printing.ppt
3D_Printing.ppt3D_Printing.ppt
3D_Printing.ppt
 
Gas Chromatography.ppt
Gas Chromatography.pptGas Chromatography.ppt
Gas Chromatography.ppt
 
damop_2005_gif.ppt
damop_2005_gif.pptdamop_2005_gif.ppt
damop_2005_gif.ppt
 
lecture3.pptx
lecture3.pptxlecture3.pptx
lecture3.pptx
 
vortrag070704.ppt
vortrag070704.pptvortrag070704.ppt
vortrag070704.ppt
 
verbrevs3.ppt
verbrevs3.pptverbrevs3.ppt
verbrevs3.ppt
 
American Revolutionppt.ppt
American Revolutionppt.pptAmerican Revolutionppt.ppt
American Revolutionppt.ppt
 
ZP394sample_ImmigrationPP.ppt
ZP394sample_ImmigrationPP.pptZP394sample_ImmigrationPP.ppt
ZP394sample_ImmigrationPP.ppt
 
Immigrants in America.ppt
Immigrants in America.pptImmigrants in America.ppt
Immigrants in America.ppt
 
Lesson 3 American History - 1800 through the Civil War(1).pptx
Lesson 3 American History - 1800 through the Civil War(1).pptxLesson 3 American History - 1800 through the Civil War(1).pptx
Lesson 3 American History - 1800 through the Civil War(1).pptx
 
سادسةHistory_of_USA.ppt
سادسةHistory_of_USA.pptسادسةHistory_of_USA.ppt
سادسةHistory_of_USA.ppt
 
SJSUIntroSocTischlerChap8PPT.ppt
SJSUIntroSocTischlerChap8PPT.pptSJSUIntroSocTischlerChap8PPT.ppt
SJSUIntroSocTischlerChap8PPT.ppt
 
23634.ppt
23634.ppt23634.ppt
23634.ppt
 
nash_session1_e.ppt
nash_session1_e.pptnash_session1_e.ppt
nash_session1_e.ppt
 
Chapter 9.ppt
Chapter 9.pptChapter 9.ppt
Chapter 9.ppt
 
GeographyReview29_3Poverty.pptx
GeographyReview29_3Poverty.pptxGeographyReview29_3Poverty.pptx
GeographyReview29_3Poverty.pptx
 
CPRReportLaunch-Presentation-Sweden-010914-2.pptx
CPRReportLaunch-Presentation-Sweden-010914-2.pptxCPRReportLaunch-Presentation-Sweden-010914-2.pptx
CPRReportLaunch-Presentation-Sweden-010914-2.pptx
 
03-12-13Child Poverty.ppt
03-12-13Child Poverty.ppt03-12-13Child Poverty.ppt
03-12-13Child Poverty.ppt
 
DOC 12A Gender_Poverty -ECLAC.ppt
DOC 12A Gender_Poverty -ECLAC.pptDOC 12A Gender_Poverty -ECLAC.ppt
DOC 12A Gender_Poverty -ECLAC.ppt
 

Recently uploaded

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Recently uploaded (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

trs-7.ppt

  • 1. GAP Toolkit 5 Training in basic drug abuse data management and analysis Training session 7 SPSS: Recode and Compute
  • 2. Objectives • To introduce and demonstrate SPSS tools for recoding variables and creating new variables • To introduce and demonstrate the use of SPSS command syntax • To introduce and demonstrate Help features in SPSS from a dialogue box
  • 3. Types of recode • A categorical variable into a new set of categories • A continuous variable into a categorical variable
  • 4. Recode approaches • Into pre-defined categories of interest • Into categories of equal size
  • 5. Example: pre-defined categories • Recode weekly expenditure on drugs into the following categories: – Low expenditure <= £100 a week – High expenditure >= £101 a week
  • 6.
  • 8.
  • 9. click here to map old  new values
  • 10.
  • 11.
  • 12. Frequency Percent Valid percent Cumulative percent Valid Low 31 62.0 62.0 62.0 High 19 38.0 38.0 100.0 Total 50 100.0 100.0 Weekly drug expenditure
  • 13. Example: quantiles • Recode weekly expenditure into the following: – 4 categories, each with approximately the same number of cases (quartiles) – 10 categories, each with approximately the same number of cases (deciles)
  • 14.
  • 15. Frequency Percent Valid percent Cumulative percent Valid <=£90 12 24.0 24.0 24.0 £91 <= X <= £98 12 24.0 24.0 48.0 £99 <= X <= £105 13 26.0 26.0 74.0 £106 <= X >= £116 13 26.0 26.0 100.0 Total 50 100.0 100.0 NTILES of Expend
  • 16. Frequency Percentage Valid percentage Cumulative percentage Valid 1 5 10.0 10.0 10.0 2 4 8.0 8.0 18.0 3 7 14.0 14.0 32.0 4 4 8.0 8.0 40.0 5 4 8.0 8.0 48.0 6 6 12.0 12.0 60.0 7 5 10.0 10.0 70.0 8 5 10.0 10.0 80.0 9 6 12.0 12.0 92.0 10 4 8.0 8.0 100.0 Total 50 100.0 100.0 NTILES of EXPEND
  • 17. Compute • Creates new variables using: – Standard mathematical operators – A full range of functions – Conditional statements
  • 18. Transform/Compute click here to define variable type
  • 21. Explore: Yexpend Statistic Std. error Yearly drug expenditure Mean 5062.72 77.468 95% Confidence Interval for Mean Lower Bound 4907.04 Upper Bound 5218.40 5% Trimmed Mean 5072.89 Median 5148.00 Variance 300062.3 Std. Deviation 547.779 Minimum 3848 Maximum 6032 Range 2184 Interquartile Range 754.00 Skewness -.333 .337 Kurtosis -.446 .662 Descriptives
  • 22. Example 2: Age • Convert date of birth to age in years
  • 23. (DATE.DMY(01,01,2002) - dob) / (365.25*24*60*60)
  • 24. Explore: Age Statistic Std. error AGE Mean 25.43 1.219 95% Confidence Interval for Mean Lower Bound 22.97 Upper Bound 27.88 5% Trimmed Mean 25.21 Median 22.84 Variance 72.867 Std. Deviation 8.536 Minimum 11 Maximum 44 Range 32 Interquartile Range 12.77 Skewness .579 .340 Kurtosis -.518 .668 Descriptives
  • 25. Help • Context-sensitive Help: – Right click on any part of a dialogue box to obtain help • Dialogue box Help button
  • 26.
  • 27.
  • 28. Command language • Command-line rather than Windows interface • More flexible • Reusable • Saved as text files
  • 29. Syntax window • Enter SPSS commands: – Type directly – Paste from a dialogue box • Run SPSS commands • Save as a text file
  • 30. The Paste button click to copy command into Syntax Window
  • 31.
  • 34. Summary • Recode: – Into same variable – Into different variable • Compute: – Mathematical operators – Functions • Dialogue box Help: – Context-sensitive Help – Dialogue box Help button • Command language: – Syntax Window – Dialogue box Paste button