trs-7.ppt

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
trs-7.ppt
select variable for
recoding and click
trs-7.ppt
click here to map
old  new values
trs-7.ppt
trs-7.ppt
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)
trs-7.ppt
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
trs-7.ppt
trs-7.ppt
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
trs-7.ppt
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
1 sur 34

Recommandé

QNT 561 Introduction Education--qnt561.com par
QNT 561 Introduction Education--qnt561.comQNT 561 Introduction Education--qnt561.com
QNT 561 Introduction Education--qnt561.comkopiko227
23 vues65 diapositives
How predictive models help Medicinal Chemists design better drugs_webinar par
How predictive models help Medicinal Chemists design better drugs_webinarHow predictive models help Medicinal Chemists design better drugs_webinar
How predictive models help Medicinal Chemists design better drugs_webinarAnn-Marie Roche
753 vues40 diapositives
Understanding statistics in laboratory quality control par
Understanding statistics in laboratory quality controlUnderstanding statistics in laboratory quality control
Understanding statistics in laboratory quality controlRandox
5.5K vues32 diapositives
Power and sample size calculations for survival analysis webinar Slides par
Power and sample size calculations for survival analysis webinar SlidesPower and sample size calculations for survival analysis webinar Slides
Power and sample size calculations for survival analysis webinar SlidesnQuery
2.2K vues21 diapositives
Missing Parts I don’t think you understood the assignment.docx par
Missing Parts I don’t think you understood the assignment.docxMissing Parts I don’t think you understood the assignment.docx
Missing Parts I don’t think you understood the assignment.docxannandleola
2 vues59 diapositives
1030 franciskovich using our laptop par
1030 franciskovich using our laptop1030 franciskovich using our laptop
1030 franciskovich using our laptopRising Media, Inc.
115 vues27 diapositives

Contenu connexe

Similaire à trs-7.ppt

1030 track3 boire par
1030 track3 boire1030 track3 boire
1030 track3 boireRising Media, Inc.
114 vues23 diapositives
1000 track2 boire par
1000 track2 boire1000 track2 boire
1000 track2 boireRising Media, Inc.
151 vues33 diapositives
QM-032-SQC tool application par
QM-032-SQC tool applicationQM-032-SQC tool application
QM-032-SQC tool applicationhandbook
707 vues42 diapositives
hspring07-085bk par
hspring07-085bkhspring07-085bk
hspring07-085bkWinter Liu
164 vues25 diapositives
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docx par
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docxRequired ResourceTextSchneider, A. (2017). Managerial Accounti.docx
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docxaudeleypearl
2 vues121 diapositives
Capacity planning ppt @ bec doms par
Capacity planning ppt @ bec domsCapacity planning ppt @ bec doms
Capacity planning ppt @ bec domsBabasab Patil
5.2K vues35 diapositives

Similaire à trs-7.ppt(20)

QM-032-SQC tool application par handbook
QM-032-SQC tool applicationQM-032-SQC tool application
QM-032-SQC tool application
handbook707 vues
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docx par audeleypearl
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docxRequired ResourceTextSchneider, A. (2017). Managerial Accounti.docx
Required ResourceTextSchneider, A. (2017). Managerial Accounti.docx
audeleypearl2 vues
Capacity planning ppt @ bec doms par Babasab Patil
Capacity planning ppt @ bec domsCapacity planning ppt @ bec doms
Capacity planning ppt @ bec doms
Babasab Patil5.2K vues
Exp22_Excel_Ch06_Cumulative - AutoSales 1.1_Instructions.docxG.docx par pauline234567
Exp22_Excel_Ch06_Cumulative - AutoSales 1.1_Instructions.docxG.docxExp22_Excel_Ch06_Cumulative - AutoSales 1.1_Instructions.docxG.docx
Exp22_Excel_Ch06_Cumulative - AutoSales 1.1_Instructions.docxG.docx
pauline234567355 vues
OL 325 Milestone Three Guidelines and Rubric Section par MoseStaton39
 OL 325 Milestone Three Guidelines and Rubric  Section OL 325 Milestone Three Guidelines and Rubric  Section
OL 325 Milestone Three Guidelines and Rubric Section
MoseStaton393 vues
Bayesian Approaches To Improve Sample Size Webinar par nQuery
Bayesian Approaches To Improve Sample Size WebinarBayesian Approaches To Improve Sample Size Webinar
Bayesian Approaches To Improve Sample Size Webinar
nQuery734 vues
Pharmacoeconomics - 2020_New.pptx par HamadAlshabi
Pharmacoeconomics - 2020_New.pptxPharmacoeconomics - 2020_New.pptx
Pharmacoeconomics - 2020_New.pptx
HamadAlshabi4 vues
Data Insight Leaders Summit Barcelona 2017 par Harvinder Atwal
Data Insight Leaders Summit Barcelona 2017Data Insight Leaders Summit Barcelona 2017
Data Insight Leaders Summit Barcelona 2017
Harvinder Atwal218 vues
Spss basic Dr Marwa Zalat par Marwa Zalat
Spss basic Dr Marwa ZalatSpss basic Dr Marwa Zalat
Spss basic Dr Marwa Zalat
Marwa Zalat196 vues

Plus de Gurumurthy B R

basic_rules.ppt par
basic_rules.pptbasic_rules.ppt
basic_rules.pptGurumurthy B R
2 vues38 diapositives
3D_Printing.ppt par
3D_Printing.ppt3D_Printing.ppt
3D_Printing.pptGurumurthy B R
1 vue13 diapositives
Gas Chromatography.ppt par
Gas Chromatography.pptGas Chromatography.ppt
Gas Chromatography.pptGurumurthy B R
2 vues19 diapositives
damop_2005_gif.ppt par
damop_2005_gif.pptdamop_2005_gif.ppt
damop_2005_gif.pptGurumurthy B R
1 vue50 diapositives
lecture3.pptx par
lecture3.pptxlecture3.pptx
lecture3.pptxGurumurthy B R
1 vue22 diapositives
vortrag070704.ppt par
vortrag070704.pptvortrag070704.ppt
vortrag070704.pptGurumurthy B R
2 vues61 diapositives

Plus de Gurumurthy B R(20)

Lesson 3 American History - 1800 through the Civil War(1).pptx par Gurumurthy B R
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
CPRReportLaunch-Presentation-Sweden-010914-2.pptx par Gurumurthy B R
CPRReportLaunch-Presentation-Sweden-010914-2.pptxCPRReportLaunch-Presentation-Sweden-010914-2.pptx
CPRReportLaunch-Presentation-Sweden-010914-2.pptx

Dernier

MercerJesse3.0.pdf par
MercerJesse3.0.pdfMercerJesse3.0.pdf
MercerJesse3.0.pdfjessemercerail
233 vues6 diapositives
Presentation_NC_Future now 2006.pdf par
Presentation_NC_Future now 2006.pdfPresentation_NC_Future now 2006.pdf
Presentation_NC_Future now 2006.pdfLora
38 vues74 diapositives
The Picture Of A Photograph par
The Picture Of A PhotographThe Picture Of A Photograph
The Picture Of A PhotographEvelyn Donaldson
39 vues81 diapositives
Thanksgiving!.pdf par
Thanksgiving!.pdfThanksgiving!.pdf
Thanksgiving!.pdfEnglishCEIPdeSigeiro
637 vues17 diapositives
Creative Restart 2023: Christophe Wechsler - From the Inside Out: Cultivating... par
Creative Restart 2023: Christophe Wechsler - From the Inside Out: Cultivating...Creative Restart 2023: Christophe Wechsler - From the Inside Out: Cultivating...
Creative Restart 2023: Christophe Wechsler - From the Inside Out: Cultivating...Taste
39 vues34 diapositives
What is Digital Transformation? par
What is Digital Transformation?What is Digital Transformation?
What is Digital Transformation?Mark Brown
56 vues11 diapositives

Dernier(20)

Presentation_NC_Future now 2006.pdf par Lora
Presentation_NC_Future now 2006.pdfPresentation_NC_Future now 2006.pdf
Presentation_NC_Future now 2006.pdf
Lora 38 vues
Creative Restart 2023: Christophe Wechsler - From the Inside Out: Cultivating... par Taste
Creative Restart 2023: Christophe Wechsler - From the Inside Out: Cultivating...Creative Restart 2023: Christophe Wechsler - From the Inside Out: Cultivating...
Creative Restart 2023: Christophe Wechsler - From the Inside Out: Cultivating...
Taste39 vues
What is Digital Transformation? par Mark Brown
What is Digital Transformation?What is Digital Transformation?
What is Digital Transformation?
Mark Brown56 vues
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption... par BC Chew
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...
BC Chew55 vues
UNIT NO 13 ORGANISMS AND POPULATION.pptx par Madhuri Bhande
UNIT NO 13 ORGANISMS AND POPULATION.pptxUNIT NO 13 ORGANISMS AND POPULATION.pptx
UNIT NO 13 ORGANISMS AND POPULATION.pptx
Madhuri Bhande59 vues
GSoC 2024 .pdf par ShabNaz2
GSoC 2024 .pdfGSoC 2024 .pdf
GSoC 2024 .pdf
ShabNaz250 vues
Education of marginalized and socially disadvantages segments.pptx par GarimaBhati5
Education of marginalized and socially disadvantages segments.pptxEducation of marginalized and socially disadvantages segments.pptx
Education of marginalized and socially disadvantages segments.pptx
GarimaBhati559 vues
Introduction to AERO Supply Chain - #BEAERO Trainning program par Guennoun Wajih
Introduction to AERO Supply Chain  - #BEAERO Trainning programIntroduction to AERO Supply Chain  - #BEAERO Trainning program
Introduction to AERO Supply Chain - #BEAERO Trainning program
Guennoun Wajih142 vues
Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf par TechSoup
 Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf
Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf
TechSoup 68 vues
NodeJS and ExpressJS.pdf par ArthyR3
NodeJS and ExpressJS.pdfNodeJS and ExpressJS.pdf
NodeJS and ExpressJS.pdf
ArthyR360 vues
Peripheral artery diseases by Dr. Garvit.pptx par garvitnanecha
Peripheral artery diseases by Dr. Garvit.pptxPeripheral artery diseases by Dr. Garvit.pptx
Peripheral artery diseases by Dr. Garvit.pptx
garvitnanecha147 vues
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37 par MysoreMuleSoftMeetup
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37

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
  • 9. click here to map old  new values
  • 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)
  • 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
  • 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
  • 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