SlideShare una empresa de Scribd logo
1 de 15
SAS Samples Assurant Health SAS Users 11/18/2008 Irvin Snider
Systematic Sample From Known Number of Observations
data  work.subset; do pickit=1 to 395 by 15; set sashelp.shoes point=pickit; output; end; stop; run ;
$1,468 $181,739 $54,791 4 Madrid Men's Dress Western Europe 16 $9,845 $595,118 $175,694 12 Heidelberg Men's Casual Western Europe 15 $3,039 $226,678 $70,790 15 Seattle Boot United States 14 $10,194 $754,157 $293,313 37 Chicago Women's Dress United States 13 $361 $39,256 $8,365 22 Montevideo Sport Shoe South America 12 $939 $23,822 $11,759 8 Buenos Aires Slipper South America 11 $1,449 $110,179 $31,503 21 Manila Boot Pacific 10 $1,278 $158,688 $42,760 6 Auckland Women's Dress Pacific 9 $43 $1,836 $449 2 Al-Khobar Sport Shoe Middle East 8 $3,983 $520,271 $127,033 11 Moscow Slipper Eastern Europe 7 $1,012 $78,950 $30,157 3 Mexico City Men's Dress Central America/Caribbean 6 $20,470 $671,837 $353,361 25 Vancouver Men's Casual Canada 5 $488 $54,677 $12,601 2 Calgary Women's Dress Canada 4 $844 $66,017 $16,282 25 Nairobi Boot Africa 3 $1,565 $130,025 $39,452 12 Johannesburg Slipper Africa 2 $769 $191,821 $29,761 12 Addis Ababa Boot Africa 1 Returns Inventory Sales Stores Subsidiary Product Region Obs
Systematic Sample From Unknown Number of Observations
data  work.subset; do pickit=1 to totobs by 25; set sashelp.shoes point=pickit nobs=totobs; output; end; stop; run ;
Random Sample with Replacement
data  work.rsubset (drop=i sampsize); sampsize = 10; do i=1 to sampsize; pickit=ceil(ranuni(0)*totobs); set sashelp.shoes point=pickit nobs=totobs; output; end; stop; run ;
Random Sample without Replacement
data  work.rsubset (drop=obsleft sampsize); sampsize=10; obsleft=totobs; do while (sampsize > 0); pickit + 1; if ranuni(0)<sampsize/obsleft then do; set sashelp.shoes point=pickit nobs=totobs; output; sampsize=sampsize- 1 ; end; obsleft=obsleft-1; end; stop; run ;
Permuted Blocks Randomization for Equal Allocation to Treatments A and B
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
End ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thank You

Más contenido relacionado

Destacado

Understanding Malaysian Health Statistics
Understanding Malaysian Health StatisticsUnderstanding Malaysian Health Statistics
Understanding Malaysian Health StatisticsAzmi Mohd Tamil
 
8.Calculate samplesize for clinical trials (continuous outcome)
8.Calculate samplesize for clinical trials (continuous outcome)8.Calculate samplesize for clinical trials (continuous outcome)
8.Calculate samplesize for clinical trials (continuous outcome)Azmi Mohd Tamil
 
5. Calculate samplesize for case-control studies
5. Calculate samplesize for case-control studies5. Calculate samplesize for case-control studies
5. Calculate samplesize for case-control studiesAzmi Mohd Tamil
 
Volgen of demarreren met sociale media
Volgen of demarreren met sociale mediaVolgen of demarreren met sociale media
Volgen of demarreren met sociale mediaVRmaster
 
Angelia Explorer Report
Angelia Explorer ReportAngelia Explorer Report
Angelia Explorer ReportBrooke Young
 
Moving from Repairing Homes to Rebuilding Neighborhoods in Haiti
Moving from Repairing Homes to Rebuilding Neighborhoods in HaitiMoving from Repairing Homes to Rebuilding Neighborhoods in Haiti
Moving from Repairing Homes to Rebuilding Neighborhoods in HaitiDaniel O'Neil
 
Concept Maps
Concept MapsConcept Maps
Concept Mapsstandura
 
Olenka Explorer Report.
Olenka Explorer Report.Olenka Explorer Report.
Olenka Explorer Report.Brooke Young
 
Sociale media ICT brabant
Sociale media ICT brabantSociale media ICT brabant
Sociale media ICT brabantVRmaster
 
Omar Explorer Report
Omar Explorer ReportOmar Explorer Report
Omar Explorer ReportBrooke Young
 
Swaip pitch
Swaip pitchSwaip pitch
Swaip pitchVRmaster
 
Add and Subtract Decimals
Add and Subtract DecimalsAdd and Subtract Decimals
Add and Subtract DecimalsBrooke Young
 
Tedx sociale media
Tedx sociale mediaTedx sociale media
Tedx sociale mediaVRmaster
 
Bloga Sortzen Ibai Uriz
Bloga Sortzen Ibai UrizBloga Sortzen Ibai Uriz
Bloga Sortzen Ibai Urizibai1993
 
Swaip beta presentatie
Swaip beta presentatieSwaip beta presentatie
Swaip beta presentatieVRmaster
 

Destacado (20)

Understanding Malaysian Health Statistics
Understanding Malaysian Health StatisticsUnderstanding Malaysian Health Statistics
Understanding Malaysian Health Statistics
 
Data management & statistics in clinical trials
Data management & statistics in clinical trialsData management & statistics in clinical trials
Data management & statistics in clinical trials
 
8.Calculate samplesize for clinical trials (continuous outcome)
8.Calculate samplesize for clinical trials (continuous outcome)8.Calculate samplesize for clinical trials (continuous outcome)
8.Calculate samplesize for clinical trials (continuous outcome)
 
5. Calculate samplesize for case-control studies
5. Calculate samplesize for case-control studies5. Calculate samplesize for case-control studies
5. Calculate samplesize for case-control studies
 
Volgen of demarreren met sociale media
Volgen of demarreren met sociale mediaVolgen of demarreren met sociale media
Volgen of demarreren met sociale media
 
Angelia Explorer Report
Angelia Explorer ReportAngelia Explorer Report
Angelia Explorer Report
 
Moving from Repairing Homes to Rebuilding Neighborhoods in Haiti
Moving from Repairing Homes to Rebuilding Neighborhoods in HaitiMoving from Repairing Homes to Rebuilding Neighborhoods in Haiti
Moving from Repairing Homes to Rebuilding Neighborhoods in Haiti
 
Concept Maps
Concept MapsConcept Maps
Concept Maps
 
Olenka Explorer Report.
Olenka Explorer Report.Olenka Explorer Report.
Olenka Explorer Report.
 
Sociale media ICT brabant
Sociale media ICT brabantSociale media ICT brabant
Sociale media ICT brabant
 
Buying and selling a business seminar part 1 slides
Buying and selling a business seminar part 1 slidesBuying and selling a business seminar part 1 slides
Buying and selling a business seminar part 1 slides
 
Omar Explorer Report
Omar Explorer ReportOmar Explorer Report
Omar Explorer Report
 
Swaip pitch
Swaip pitchSwaip pitch
Swaip pitch
 
Mappe 2 Pp
Mappe 2 PpMappe 2 Pp
Mappe 2 Pp
 
Add and Subtract Decimals
Add and Subtract DecimalsAdd and Subtract Decimals
Add and Subtract Decimals
 
Tedx sociale media
Tedx sociale mediaTedx sociale media
Tedx sociale media
 
Bloga Sortzen Ibai Uriz
Bloga Sortzen Ibai UrizBloga Sortzen Ibai Uriz
Bloga Sortzen Ibai Uriz
 
Medicaid Presentation De Boer Baumann
Medicaid Presentation De Boer BaumannMedicaid Presentation De Boer Baumann
Medicaid Presentation De Boer Baumann
 
Swaip beta presentatie
Swaip beta presentatieSwaip beta presentatie
Swaip beta presentatie
 
Predatore3
Predatore3Predatore3
Predatore3
 

Último

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
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
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
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
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Último (20)

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
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
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
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 ...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Sas Samples

  • 1. SAS Samples Assurant Health SAS Users 11/18/2008 Irvin Snider
  • 2. Systematic Sample From Known Number of Observations
  • 3. data work.subset; do pickit=1 to 395 by 15; set sashelp.shoes point=pickit; output; end; stop; run ;
  • 4. $1,468 $181,739 $54,791 4 Madrid Men's Dress Western Europe 16 $9,845 $595,118 $175,694 12 Heidelberg Men's Casual Western Europe 15 $3,039 $226,678 $70,790 15 Seattle Boot United States 14 $10,194 $754,157 $293,313 37 Chicago Women's Dress United States 13 $361 $39,256 $8,365 22 Montevideo Sport Shoe South America 12 $939 $23,822 $11,759 8 Buenos Aires Slipper South America 11 $1,449 $110,179 $31,503 21 Manila Boot Pacific 10 $1,278 $158,688 $42,760 6 Auckland Women's Dress Pacific 9 $43 $1,836 $449 2 Al-Khobar Sport Shoe Middle East 8 $3,983 $520,271 $127,033 11 Moscow Slipper Eastern Europe 7 $1,012 $78,950 $30,157 3 Mexico City Men's Dress Central America/Caribbean 6 $20,470 $671,837 $353,361 25 Vancouver Men's Casual Canada 5 $488 $54,677 $12,601 2 Calgary Women's Dress Canada 4 $844 $66,017 $16,282 25 Nairobi Boot Africa 3 $1,565 $130,025 $39,452 12 Johannesburg Slipper Africa 2 $769 $191,821 $29,761 12 Addis Ababa Boot Africa 1 Returns Inventory Sales Stores Subsidiary Product Region Obs
  • 5. Systematic Sample From Unknown Number of Observations
  • 6. data work.subset; do pickit=1 to totobs by 25; set sashelp.shoes point=pickit nobs=totobs; output; end; stop; run ;
  • 7. Random Sample with Replacement
  • 8. data work.rsubset (drop=i sampsize); sampsize = 10; do i=1 to sampsize; pickit=ceil(ranuni(0)*totobs); set sashelp.shoes point=pickit nobs=totobs; output; end; stop; run ;
  • 9. Random Sample without Replacement
  • 10. data work.rsubset (drop=obsleft sampsize); sampsize=10; obsleft=totobs; do while (sampsize > 0); pickit + 1; if ranuni(0)<sampsize/obsleft then do; set sashelp.shoes point=pickit nobs=totobs; output; sampsize=sampsize- 1 ; end; obsleft=obsleft-1; end; stop; run ;
  • 11. Permuted Blocks Randomization for Equal Allocation to Treatments A and B
  • 12.
  • 13.
  • 14.

Notas del editor

  1. SAS Sampling Presenting five sampling examples and five pieces of code: 1. Systematic sample from known number of observations 2. Systematic sample from unknown number of observations 3. Random sample with replacement 4. Random sample without replacement 5. Permuted blocks randomization Why am I presenting this? SAS by default reads observations on a data set sequentially 1. May make life easier to get a sample instead of going against the entire data set. Especially when you are concerned with the accuracy of the data. 2. There may be a need for sampling in your area.