221.ANALYZING YOGA ASANAS WORLDWIDE USING PROCS | CONTENTS | PRINT | MEANS | SORT | FREQ | UNIVARIATE | SQL | FORMAT | RANK | MACROS , OPTIONS AND FUNCTIONS IN SAS

ANALYZING YOGA ASANAS WORLDWIDE USING PROCS | CONTENTS | PRINT | MEANS | SORT | FREQ |  UNIVARIATE | SQL | FORMAT | RANK | MACROS , OPTIONS AND FUNCTIONS IN SAS

 /*Creating a unique dataset of Yoga Asanas practiced worldwide*/

1. CREATING THE YOGA ASANA DATASET

options nocenter nodate pagesize=50 linesize=150;

data yoga_asanas;

    infile datalines dsd truncover;

    length Asana_Name $40 Origin $20 Difficulty $15 Body_Focus $30 

           Benefits $80 Duration_Min 8 Popularity_Score 8 Country $25;

    input Asana_Name $ Origin $ Difficulty $ Body_Focus $ Benefits $ Duration_Min Popularity_Score Country $;

    datalines;

Tadasana,India,Easy,Full Body,Improves posture and balance,2,80,India

Vrikshasana,India,Easy,Legs and Spine,Enhances balance and stability,3,78,USA

Trikonasana,India,Medium,Legs and Waist,Improves digestion and stretches legs,4,75,UK

Bhujangasana,India,Medium,Spine and Chest,Strengthens spine and relieves stress,3,85,Canada

Adho Mukha Svanasana,India,Medium,Full Body,Relieves fatigue and energizes body,5,90,Germany

Shavasana,India,Easy,Whole Body,Promotes relaxation and reduces stress,10,95,Japan

Padmasana,India,Hard,Hips and Spine,Calms the mind and prepares for meditation,7,70,Nepal

Natarajasana,India,Hard,Legs and Back,Enhances flexibility and balance,5,68,Australia

Ustrasana,India,Medium,Chest and Spine,Improves posture and stretches body,4,72,France

Garudasana,India,Hard,Legs and Arms,Improves concentration and flexibility,4,65,Brazil

Paschimottanasana,India,Medium,Hamstrings and Spine,Relieves stress and anxiety,6,77,India

Matsyasana,India,Medium,Chest and Throat,Stimulates throat and abdominal organs,5,73,Russia

Halasana,India,Hard,Back and Shoulders,Reduces backache and improves digestion,5,71,USA

Dhanurasana,India,Hard,Abdomen and Back,Stimulates reproductive organs and strengthens back,4,69,Canada

Setu Bandhasana,India,Medium,Back and Neck,Reduces anxiety and strengthens back,4,74,UK

Sirsasana,India,Very Hard,Brain and Spine,Boosts blood flow to brain and concentration,3,60,Germany

;

run;

proc print;run;

Output:

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Tadasana India Easy Full Body Improves posture and balance 2 80 India
2 Vrikshasana India Easy Legs and Spine Enhances balance and stability 3 78 USA
3 Trikonasana India Medium Legs and Waist Improves digestion and stretches legs 4 75 UK
4 Bhujangasana India Medium Spine and Chest Strengthens spine and relieves stress 3 85 Canada
5 Adho Mukha Svanasana India Medium Full Body Relieves fatigue and energizes body 5 90 Germany
6 Shavasana India Easy Whole Body Promotes relaxation and reduces stress 10 95 Japan
7 Padmasana India Hard Hips and Spine Calms the mind and prepares for meditation 7 70 Nepal
8 Natarajasana India Hard Legs and Back Enhances flexibility and balance 5 68 Australia
9 Ustrasana India Medium Chest and Spine Improves posture and stretches body 4 72 France
10 Garudasana India Hard Legs and Arms Improves concentration and flexibility 4 65 Brazil
11 Paschimottanasana India Medium Hamstrings and Spine Relieves stress and anxiety 6 77 India
12 Matsyasana India Medium Chest and Throat Stimulates throat and abdominal organs 5 73 Russia
13 Halasana India Hard Back and Shoulders Reduces backache and improves digestion 5 71 USA
14 Dhanurasana India Hard Abdomen and Back Stimulates reproductive organs and strengthens back 4 69 Canada
15 Setu Bandhasana India Medium Back and Neck Reduces anxiety and strengthens back 4 74 UK
16 Sirsasana India Very Hard Brain and Spine Boosts blood flow to brain and concentration 3 60 Germany


2. USE OF PROC CONTENTS | PROC PRINT | PROC MEANS

/* OPTIONS */

options nodate nocenter ps=60 ls=120;


/* VIEW METADATA */

proc contents data=yoga_asanas;

    title "Structure of Yoga Asanas Dataset";

run;

Output:

Structure of Yoga Asanas Dataset

The CONTENTS Procedure

Data Set Name WORK.YOGA_ASANAS Observations 16
Member Type DATA Variables 8
Engine V9 Indexes 0
Created 14/09/2015 00:04:40 Observation Length 232
Last Modified 14/09/2015 00:04:40 Deleted Observations 0
Protection   Compressed NO
Data Set Type   Sorted NO
Label      
Data Representation WINDOWS_64    
Encoding wlatin1 Western (Windows)    


Engine/Host Dependent Information
Data Set Page Size 65536
Number of Data Set Pages 1
First Data Page 1
Max Obs per Page 282
Obs in First Data Page 16
Number of Data Set Repairs 0
ExtendObsCounter YES
Filename C:\Users\Lenovo\AppData\Local\Temp\SAS Temporary Files\_TD6632_DESKTOP-QFAA4KV_\yoga_asanas.sas7bdat
Release Created 9.0401M2
Host Created X64_8HOME


Alphabetic List of Variables and Attributes
# Variable Type Len
1 Asana_Name Char 40
5 Benefits Char 80
4 Body_Focus Char 30
8 Country Char 25
3 Difficulty Char 15
6 Duration_Min Num 8
2 Origin Char 20
7 Popularity_Score Num 8


/* VIEW DATA */

proc print data=yoga_asanas(obs=10);

    title "Top 10 Yoga Asanas by Observation";

run;

Output:

Top 10 Yoga Asanas by Observation

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Tadasana India Easy Full Body Improves posture and balance 2 80 India
2 Vrikshasana India Easy Legs and Spine Enhances balance and stability 3 78 USA
3 Trikonasana India Medium Legs and Waist Improves digestion and stretches legs 4 75 UK
4 Bhujangasana India Medium Spine and Chest Strengthens spine and relieves stress 3 85 Canada
5 Adho Mukha Svanasana India Medium Full Body Relieves fatigue and energizes body 5 90 Germany
6 Shavasana India Easy Whole Body Promotes relaxation and reduces stress 10 95 Japan
7 Padmasana India Hard Hips and Spine Calms the mind and prepares for meditation 7 70 Nepal
8 Natarajasana India Hard Legs and Back Enhances flexibility and balance 5 68 Australia
9 Ustrasana India Medium Chest and Spine Improves posture and stretches body 4 72 France
10 Garudasana India Hard Legs and Arms Improves concentration and flexibility 4 65 Brazil


/* DESCRIPTIVE STATS */

proc means data=yoga_asanas n mean min max std;

    var Duration_Min Popularity_Score;

    title "Descriptive Statistics for Duration and Popularity";

run;

Output:

Descriptive Statistics for Duration and Popularity

The MEANS Procedure

Variable N Mean Minimum Maximum Std Dev
Duration_Min
Popularity_Score
16
16
4.6250000
75.1250000
2.0000000
60.0000000
10.0000000
95.0000000
1.8929694
9.0470990


3. USE OF PROC SORT | PROC FREQ | PROC UNIVARIATE

/* SORT BY COUNTRY AND POPULARITY */

proc sort data=yoga_asanas out=sorted_asanas;

    by descending Popularity_Score;

run;

proc print;run;

Output:

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Shavasana India Easy Whole Body Promotes relaxation and reduces stress 10 95 Japan
2 Adho Mukha Svanasana India Medium Full Body Relieves fatigue and energizes body 5 90 Germany
3 Bhujangasana India Medium Spine and Chest Strengthens spine and relieves stress 3 85 Canada
4 Tadasana India Easy Full Body Improves posture and balance 2 80 India
5 Vrikshasana India Easy Legs and Spine Enhances balance and stability 3 78 USA
6 Paschimottanasana India Medium Hamstrings and Spine Relieves stress and anxiety 6 77 India
7 Trikonasana India Medium Legs and Waist Improves digestion and stretches legs 4 75 UK
8 Setu Bandhasana India Medium Back and Neck Reduces anxiety and strengthens back 4 74 UK
9 Matsyasana India Medium Chest and Throat Stimulates throat and abdominal organs 5 73 Russia
10 Ustrasana India Medium Chest and Spine Improves posture and stretches body 4 72 France
11 Halasana India Hard Back and Shoulders Reduces backache and improves digestion 5 71 USA
12 Padmasana India Hard Hips and Spine Calms the mind and prepares for meditation 7 70 Nepal
13 Dhanurasana India Hard Abdomen and Back Stimulates reproductive organs and strengthens back 4 69 Canada
14 Natarajasana India Hard Legs and Back Enhances flexibility and balance 5 68 Australia
15 Garudasana India Hard Legs and Arms Improves concentration and flexibility 4 65 Brazil
16 Sirsasana India Very Hard Brain and Spine Boosts blood flow to brain and concentration 3 60 Germany


/* FREQUENCY OF DIFFICULTY LEVELS */

proc freq data=yoga_asanas;

    tables Difficulty / nocum nopercent;

    title "Frequency of Asanas by Difficulty";

run;

Output:

Frequency of Asanas by Difficulty

The FREQ Procedure

Difficulty Frequency
Easy 3
Hard 5
Medium 7
Very Hard 1

/* ANALYZE POPULARITY SCORE DISTRIBUTION */

proc univariate data=yoga_asanas;

    var Popularity_Score;

    title "Univariate Analysis of Popularity Score";

run;

Output:

Univariate Analysis of Popularity Score

The UNIVARIATE Procedure
Variable: Popularity_Score

Moments
N 16 Sum Weights 16
Mean 75.125 Sum Observations 1202
Std Deviation 9.04709898 Variance 81.85
Skewness 0.7115414 Kurtosis 0.50109715
Uncorrected SS 91528 Corrected SS 1227.75
Coeff Variation 12.0427274 Std Error Mean 2.26177475


Basic Statistical Measures
Location Variability
Mean 75.12500 Std Deviation 9.04710
Median 73.50000 Variance 81.85000
Mode . Range 35.00000
    Interquartile Range 9.50000


Tests for Location: Mu0=0
Test Statistic p Value
Student's t t 33.21507 Pr > |t| <.0001
Sign M 8 Pr >= |M| <.0001
Signed Rank S 68 Pr >= |S| <.0001


Quantiles (Definition 5)
Level Quantile
100% Max 95.0
99% 95.0
95% 95.0
90% 90.0
75% Q3 79.0
50% Median 73.5
25% Q1 69.5
10% 65.0
5% 60.0
1% 60.0
0% Min 60.0


Extreme Observations
Lowest Highest
Value Obs Value Obs
60 16 78 2
65 10 80 1
68 8 85 4
69 14 90 5
70 7 95 6


4. SQL PROCEDURE TO QUERY DATA | FUNCTIONS USED

proc sql;

    create table top_asanas as

    select Asana_Name, Country, Popularity_Score, Duration_Min,

           upcase(Difficulty) as Difficulty_Level,

           propcase(Benefits) as Standard_Benefits,

           strip(Body_Focus) as Clean_Focus

    from yoga_asanas

    where Popularity_Score > 75

    order by Popularity_Score desc;

quit;

proc print data=top_asanas;

    title "Top Asanas with Popularity > 75";

run;

Output:

Top Asanas with Popularity > 75

Obs Asana_Name Country Popularity_Score Duration_Min Difficulty_Level Standard_Benefits Clean_Focus
1 Shavasana Japan 95 10 EASY Promotes Relaxation And Reduces Stress Whole Body
2 Adho Mukha Svanasana Germany 90 5 MEDIUM Relieves Fatigue And Energizes Body Full Body
3 Bhujangasana Canada 85 3 MEDIUM Strengthens Spine And Relieves Stress Spine and Chest
4 Tadasana India 80 2 EASY Improves Posture And Balance Full Body
5 Vrikshasana USA 78 3 EASY Enhances Balance And Stability Legs and Spine
6 Paschimottanasana India 77 6 MEDIUM Relieves Stress And Anxiety Hamstrings and Spine


5. MACRO TO FILTER BY DIFFICULTY

%macro filter_asanas(level);

    %put Filtering Asanas of Difficulty: &level;


    proc sql;

        create table asana_&level as

        select * from yoga_asanas

        where upcase(Difficulty) = "%upcase(&level)";

    quit;


    proc print data=asana_&level;

        title "Asanas with Difficulty: &level";

    run;

%mend;


%filter_asanas(Easy);

Output:

Asanas with Difficulty: Easy

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Tadasana India Easy Full Body Improves posture and balance 2 80 India
2 Vrikshasana India Easy Legs and Spine Enhances balance and stability 3 78 USA
3 Shavasana India Easy Whole Body Promotes relaxation and reduces stress 10 95 Japan


%filter_asanas(Medium);

Output:

Asanas with Difficulty: Medium

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Trikonasana India Medium Legs and Waist Improves digestion and stretches legs 4 75 UK
2 Bhujangasana India Medium Spine and Chest Strengthens spine and relieves stress 3 85 Canada
3 Adho Mukha Svanasana India Medium Full Body Relieves fatigue and energizes body 5 90 Germany
4 Ustrasana India Medium Chest and Spine Improves posture and stretches body 4 72 France
5 Paschimottanasana India Medium Hamstrings and Spine Relieves stress and anxiety 6 77 India
6 Matsyasana India Medium Chest and Throat Stimulates throat and abdominal organs 5 73 Russia
7 Setu Bandhasana India Medium Back and Neck Reduces anxiety and strengthens back 4 74 UK


%filter_asanas(Hard);

Output:

Asanas with Difficulty: Hard

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Padmasana India Hard Hips and Spine Calms the mind and prepares for meditation 7 70 Nepal
2 Natarajasana India Hard Legs and Back Enhances flexibility and balance 5 68 Australia
3 Garudasana India Hard Legs and Arms Improves concentration and flexibility 4 65 Brazil
4 Halasana India Hard Back and Shoulders Reduces backache and improves digestion 5 71 USA
5 Dhanurasana India Hard Abdomen and Back Stimulates reproductive organs and strengthens back 4 69 Canada

6. CREATING A DURATION CATEGORY USING IF-ELSE AND FUNCTIONS

data yoga_asanas_duration;

    set yoga_asanas;

    length Duration_Category $15;


    if Duration_Min <= 3 then Duration_Category = "Short";

    else if 4 <= Duration_Min <= 6 then Duration_Category = "Medium";

    else Duration_Category = "Long";


    Label Duration_Category = "Session Duration Type";

run;

proc print;run;

Output:

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country Duration_Category
1 Tadasana India Easy Full Body Improves posture and balance 2 80 India Short
2 Vrikshasana India Easy Legs and Spine Enhances balance and stability 3 78 USA Short
3 Trikonasana India Medium Legs and Waist Improves digestion and stretches legs 4 75 UK Medium
4 Bhujangasana India Medium Spine and Chest Strengthens spine and relieves stress 3 85 Canada Short
5 Adho Mukha Svanasana India Medium Full Body Relieves fatigue and energizes body 5 90 Germany Medium
6 Shavasana India Easy Whole Body Promotes relaxation and reduces stress 10 95 Japan Long
7 Padmasana India Hard Hips and Spine Calms the mind and prepares for meditation 7 70 Nepal Long
8 Natarajasana India Hard Legs and Back Enhances flexibility and balance 5 68 Australia Medium
9 Ustrasana India Medium Chest and Spine Improves posture and stretches body 4 72 France Medium
10 Garudasana India Hard Legs and Arms Improves concentration and flexibility 4 65 Brazil Medium
11 Paschimottanasana India Medium Hamstrings and Spine Relieves stress and anxiety 6 77 India Medium
12 Matsyasana India Medium Chest and Throat Stimulates throat and abdominal organs 5 73 Russia Medium
13 Halasana India Hard Back and Shoulders Reduces backache and improves digestion 5 71 USA Medium
14 Dhanurasana India Hard Abdomen and Back Stimulates reproductive organs and strengthens back 4 69 Canada Medium
15 Setu Bandhasana India Medium Back and Neck Reduces anxiety and strengthens back 4 74 UK Medium
16 Sirsasana India Very Hard Brain and Spine Boosts blood flow to brain and concentration 3 60 Germany Short


proc freq data=yoga_asanas_duration;

    tables Duration_Category;

    title "Yoga Asanas by Duration Category";

run;

Output:

Yoga Asanas by Duration Category

The FREQ Procedure

Session Duration Type
Duration_Category Frequency Percent Cumulative
Frequency
Cumulative
Percent
Long 2 12.50 2 12.50
Medium 10 62.50 12 75.00
Short 4 25.00 16 100.00

7. GROUPING DATA USING PROC SQL AND AGGREGATE FUNCTIONS

proc sql;

    create table avg_popularity_country as

    select Country, count(*) as Total_Asanas,

           avg(Popularity_Score) format=5.1 as Avg_Popularity

    from yoga_asanas

    group by Country

    having calculated Avg_Popularity > 70;

quit;


proc print data=avg_popularity_country;

    title "Countries with Avg Popularity > 70";

run;

Output:

Countries with Avg Popularity > 70

Obs Country Total_Asanas Avg_Popularity
1 Canada 2 77.0
2 France 1 72.0
3 Germany 2 75.0
4 India 2 78.5
5 Japan 1 95.0
6 Russia 1 73.0
7 UK 2 74.5
8 USA 2 74.5

8. MACRO FOR COUNTRY-SPECIFIC EXPORT USING CALL EXECUTE

%macro export_country_data;


    proc sql noprint;

        select distinct Country into :clist separated by ','

        from yoga_asanas;

    quit;


    %let n = %sysfunc(countw(%superq(clist), %str(,)));  

    %do i = 1 %to &n;

        %let c = %scan(%superq(clist), &i, %str(,));    

        %let c_clean = %sysfunc(tranwrd(%superq(c), %str( ), _));  


        data country_&c_clean;

            set yoga_asanas;

            where Country = "&c";

        run;

        proc print data=country_&c_clean;

            title "Yoga Asanas from &c";

        run;

    %end;

%mend;


%export_country_data;

Output:

Yoga Asanas from Australia

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Natarajasana India Hard Legs and Back Enhances flexibility and balance 5 68 Australia

Yoga Asanas from Brazil

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Garudasana India Hard Legs and Arms Improves concentration and flexibility 4 65 Brazil

Yoga Asanas from Canada

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Bhujangasana India Medium Spine and Chest Strengthens spine and relieves stress 3 85 Canada
2 Dhanurasana India Hard Abdomen and Back Stimulates reproductive organs and strengthens back 4 69 Canada

Yoga Asanas from France

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Ustrasana India Medium Chest and Spine Improves posture and stretches body 4 72 France

Yoga Asanas from Germany

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Adho Mukha Svanasana India Medium Full Body Relieves fatigue and energizes body 5 90 Germany
2 Sirsasana India Very Hard Brain and Spine Boosts blood flow to brain and concentration 3 60 Germany

Yoga Asanas from India

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Tadasana India Easy Full Body Improves posture and balance 2 80 India
2 Paschimottanasana India Medium Hamstrings and Spine Relieves stress and anxiety 6 77 India

Yoga Asanas from Japan

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Shavasana India Easy Whole Body Promotes relaxation and reduces stress 10 95 Japan


Yoga Asanas from Nepal

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Padmasana India Hard Hips and Spine Calms the mind and prepares for meditation 7 70 Nepal

Yoga Asanas from Russia

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Matsyasana India Medium Chest and Throat Stimulates throat and abdominal organs 5 73 Russia


Yoga Asanas from UK

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Trikonasana India Medium Legs and Waist Improves digestion and stretches legs 4 75 UK
2 Setu Bandhasana India Medium Back and Neck Reduces anxiety and strengthens back 4 74 UK

Yoga Asanas from USA

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Vrikshasana India Easy Legs and Spine Enhances balance and stability 3 78 USA
2 Halasana India Hard Back and Shoulders Reduces backache and improves digestion 5 71 USA

9. USE OF FORMATS FOR READABILITY

proc format;

    value $dif

        'Easy'='Beginner Level'

        'Medium'='Intermediate Level'

        'Hard'='Advanced Level'

        'Very Hard'='Expert Level';

run;


proc print data=yoga_asanas;

    format Difficulty $dif.;

    title "Formatted Difficulty Levels";

run;

Output:

Formatted Difficulty Levels

Obs Asana_Name Origin Difficulty Body_Focus Benefits Duration_Min Popularity_Score Country
1 Tadasana India Beginner Level Full Body Improves posture and balance 2 80 India
2 Vrikshasana India Beginner Level Legs and Spine Enhances balance and stability 3 78 USA
3 Trikonasana India Intermediate Level Legs and Waist Improves digestion and stretches legs 4 75 UK
4 Bhujangasana India Intermediate Level Spine and Chest Strengthens spine and relieves stress 3 85 Canada
5 Adho Mukha Svanasana India Intermediate Level Full Body Relieves fatigue and energizes body 5 90 Germany
6 Shavasana India Beginner Level Whole Body Promotes relaxation and reduces stress 10 95 Japan
7 Padmasana India Advanced Level Hips and Spine Calms the mind and prepares for meditation 7 70 Nepal
8 Natarajasana India Advanced Level Legs and Back Enhances flexibility and balance 5 68 Australia
9 Ustrasana India Intermediate Level Chest and Spine Improves posture and stretches body 4 72 France
10 Garudasana India Advanced Level Legs and Arms Improves concentration and flexibility 4 65 Brazil
11 Paschimottanasana India Intermediate Level Hamstrings and Spine Relieves stress and anxiety 6 77 India
12 Matsyasana India Intermediate Level Chest and Throat Stimulates throat and abdominal organs 5 73 Russia
13 Halasana India Advanced Level Back and Shoulders Reduces backache and improves digestion 5 71 USA
14 Dhanurasana India Advanced Level Abdomen and Back Stimulates reproductive organs and strengthens back 4 69 Canada
15 Setu Bandhasana India Intermediate Level Back and Neck Reduces anxiety and strengthens back 4 74 UK
16 Sirsasana India Expert Level Brain and Spine Boosts blood flow to brain and concentration 3 60 Germany


10. ADVANCED FUNCTION APPLICATIONS

proc rank data=yoga_asanas out=yoga_analysis descending ties=low;

    var Popularity_Score;

    ranks Popularity_Rank ;

run;


data yoga_analysis;

    set yoga_analysis;

    Duration_Logged = log(Duration_Min + 1);

    Difficulty_Length = length(Difficulty);

run;


proc print data=yoga_analysis;

    var Asana_Name Popularity_Score Popularity_Rank Duration_Logged Difficulty_Length;

    title "Corrected Popularity Rank Using PROC RANK";

run;


proc sql;

 select Asana_Name,Popularity_Score,Popularity_Rank,Duration_Logged,Difficulty_Length

  from yoga_analysis

  order by Popularity_Rank;

quit;


Output:
Corrected Popularity Rank Using PROC RANK

Asana_Name Popularity_Score Rank for Variable
Popularity_Score
Duration_Logged Difficulty_Length
Shavasana 95 1 2.397895 4
Adho Mukha Svanasana 90 2 1.791759 6
Bhujangasana 85 3 1.386294 6
Tadasana 80 4 1.098612 4
Vrikshasana 78 5 1.386294 4
Paschimottanasana 77 6 1.94591 6
Trikonasana 75 7 1.609438 6
Setu Bandhasana 74 8 1.609438 6
Matsyasana 73 9 1.791759 6
Ustrasana 72 10 1.609438 6
Halasana 71 11 1.791759 4
Padmasana 70 12 2.079442 4
Dhanurasana 69 13 1.609438 4
Natarajasana 68 14 1.791759 4
Garudasana 65 15 1.609438 4
Sirsasana 60 16 1.386294 9





To Visit My Previous Proc  Means And Nway Option:Click Here
To Visit My Previous Proc Means And CharType Option:Click Here
To Visit My Previous SAS Functions:Click Here
To Visit My Previous Length Statement Using In Many Ways:Click Here





--->PLEASE FOLLOW OUR BLOG FOR MORE INFORMATION.
--->PLEASE DO COMMENTS AND SHARE OUR BLOG.

PLEASE FOLLOW OUR TELEGRAM CHANNEL CLICK HERE

PLEASE FOLLOW OUR FACEBOOK PAGE  CLICK HERE

PLEASE FOLLOW OUR INSTAGRAM PAGE CLICK HERE


Comments