BookmarkSubscribeRSS Feed
CathyVI
Lapis Lazuli | Level 10

How did they calculate the PctGrowthAveYr in the advanced program 3  lesson 1 data ?

3 REPLIES 3
Reeza
Super User
FYI - I've moved your post to the SAS Training course forum. Note that not many users on here will have access so you may not get much response. You may want to consider contacting SAS Learning directly if you have a specific question.
Cynthia_sas
Diamond | Level 26

Hi:

  We got this same question in our tracking system and will need to ask the course developers, when they are available, if they remember the site where they got the data or how the variables were created/derived. Some of the data for our classes comes from public web sites but then needs to be subset or transformed for particular purposes in a class, such as needing a rate to use for multiplication in a DO loop.

 

  Using PROC CONTENTS on the dataset in Lesson 1, I see that the name of variable is as shown below:

 

var_list_pg3.png

 

  Since we already have a track for this question, we'll respond when we have the information. Programming 3 is not a Statistics class. It teaches advanced techniques, such as DO LOOPS, ARRAY processing, HASH tables, etc. This particular variable is used in the DO loop example in a subsequent lesson.

 

Cynthia

 

Cynthia_sas
Diamond | Level 26

Hi:
I have heard back from the course developers about the PctGrowthAvgYr variable in the pg3.population_top25countries data table used in the course. To make that table for use in the Programming 3 class, we started with WorldBank data from here: https://datacatalog.worldbank.org/public-licenses#cc-by ; for example: http://wdi.worldbank.org/table/2.1 .

However, that variable value cannot be recalculated based on the data that we have in the pg3.population_top25countries data set for the class. The value was based on the incremental growth rate for every year in the range - then averaged. We started with the 2000-2017 numbers, and calculated that value based on having values for all those years. But for the class, we only kept the first year (2000) and the last year (2017). This means that there’s not enough data in the class table to recreate the PctGrowthAvgYr variable. If you want to approximate the value, you could use this formula
growth=(((pop2017-pop2000)/pop2000)*100)/18;

But keep in mind that it will only be an approximation, not an exact number. For class purposes, we did not need all the original data for all the years. As I explained, we use that variable to be able to calculate values for a new variable in a DO loop. So the focus needs to be on DO loop processing, not on the specifics of how that variable was calculated.

Hope this helps,
Cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1254 views
  • 7 likes
  • 3 in conversation