Thursday, 4 September 2025

279.INDIAN CIGARETTE MARKET — DATA CREATION | PROC FORMAT | PROC CONTENTS | PROC SORT | PROC PRINT | PROC FREQ | PROC MEANS | PROC SUMMARY | PROC UNIVARIATE | PROC TABULATE | PROC REPORT | PROC TRANSPOSE | PROC SQL | PROC RANK | PROC SGPLOT | MACROS — IN SAS

INDIAN CIGARETTE MARKET — DATA CREATION | PROC FORMAT | PROC CONTENTS | PROC SORT | PROC PRINT | PROC FREQ | PROC MEANS | PROC SUMMARY | PROC UNIVARIATE | PROC TABULATE | PROC REPORT | PROC TRANSPOSE | PROC SQL | PROC RANK | PROC SGPLOT | MACROS — IN SAS

/*CREATING THE DATASET OF INDIAN CIGARETTE ANALYTICS */

1.PROC FORMAT — define human-friendly labels for codes

proc format;

  value $segfmt 'PREM'='Premium' 'MID'='Mid-Price' 'VAL'='Value';

  value $sizefmt 'KS'='King Size (84mm)' 'REG'='Regular (69–72mm)' 'SLIM'='Slim/100s';

  value filterfmt 0='No Filter' 1='Filter';

  value $manufmt 'ITC'='ITC Ltd.' 'GPI'='Godfrey Phillips India' 'VST'='VST Industries' 'OTH'='Others/Regional';

  value yesno 0='No' 1='Yes';

run;

Log:

NOTE: Format $SEGFMT has been output.
NOTE: Format $SIZEFMT has been output.
NOTE: Format FILTERFMT has been output.
NOTE: Format $MANUFMT has been output.
NOTE: Format YESNO has been output.

2.DATA Step

options nocenter;

data cig_master;

  length Brand $24 Type $8 Size $5 Manufacturer $3 Segment $4 City $16 State $16;

  infile datalines dlm=',' dsd truncover;

  input Brand :$24. Type :$8. Size :$5. Filter_Flag :8.

        Length_mm :8. Pack_Size :8. Tar_mg :8. Nicotine_mg :8.

        MRP_INR :8. Manufacturer :$3. Segment :$4.

        City :$16. State :$16. Menthol_Flag :8. Launch_Year :8.;

  format Segment $segfmt. Size $sizefmt. Filter_Flag filterfmt. Manufacturer $manufmt. Menthol_Flag yesno.;

datalines;

Gold Flake,Blended,KS,1,84,20,12,1.0,200,ITC, MID,Hyderabad,Telangana,0,1971

Wills Navy Cut,Blended,REG,1,69,20,14,1.2,180,ITC, MID,Chennai,Tamil Nadu,0,1963

Four Square,Blended,KS,1,84,20,13,1.1,195,GPI, MID,Pune,Maharashtra,0,1973

Charms,Flavored,REG,1,69,20,15,1.3,160,GPI, VAL,Kanpur,Uttar Pradesh,1,1971

Navy Cut 100s,Blended,SLIM,1,100,20,11,1.0,220,ITC, PREM,Kolkata,West Bengal,0,1980

Insignia,Blended,KS,1,84,20,10,0.9,600,ITC, PREM,Mumbai,Maharashtra,0,2003

Charminar,Blend,REG,0,70,10,16,1.4,140,VST, VAL,Hyderabad,Telangana,0,1930

Marlboro,Blended,KS,1,84,20,12,1.0,360,OTH, PREM,Delhi,Delhi,0,2008

Bristol,Blended,REG,1,69,20,14,1.2,170,ITC, VAL,Patna,Bihar,0,1976

Capstan,Blended,REG,1,69,20,15,1.3,165,OTH, VAL,Jaipur,Rajasthan,0,1960

Flake Excel,Blended,KS,1,84,20,12,1.1,205,ITC, MID,Indore,Madhya Pradesh,0,1992

Four Square Kings,Blended,KS,1,84,10,12,1.0,210,GPI, MID,Ahmedabad,Gujarat,0,1990

Cavanders,Blended,REG,1,69,20,13,1.1,175,GPI, MID,Surat,Gujarat,0,1985

Dunhill Switch,Flavored,KS,1,84,20,10,0.8,500,OTH, PREM,Bengaluru,Karnataka,1,2012

Classic Menthol,Flavored,KS,1,84,20,11,0.9,340,ITC, PREM,Thane,Maharashtra,1,2005

Duke,Blend,REG,1,70,20,15,1.3,150,VST, VAL,Vijayawada,Andhra Pradesh,0,1974

Gold Flake Neo,Blended,KS,1,84,20,12,1.0,230,ITC, MID,Noida,Uttar Pradesh,0,2018

Navy Cut Filter,Blended,REG,1,69,10,14,1.2,185,ITC, MID,Coimbatore,Tamil Nadu,0,1977

Benson & Hedges,Blended,KS,1,84,20,10,0.8,520,OTH, PREM,Chandigarh,Chandigarh,0,2009

Charminar Special,Blend,REG,0,70,20,17,1.5,145,VST, VAL,Warangal,Telangana,0,1955

;

run;

proc print;run;

Output:

ObsBrandTypeSizeManufacturerSegmentCityStateFilter_FlagLength_mmPack_SizeTar_mgNicotine_mgMRP_INRMenthol_FlagLaunch_Year
1Gold FlakeBlendedKing Size (84mm)ITC Ltd.Mid-PriceHyderabadTelanganaFilter8420121.0200No1971
2Wills Navy CutBlendedRegular (69–72mm)ITC Ltd.Mid-PriceChennaiTamil NaduFilter6920141.2180No1963
3Four SquareBlendedKing Size (84mm)Godfrey Phillips IndiaMid-PricePuneMaharashtraFilter8420131.1195No1973
4CharmsFlavoredRegular (69–72mm)Godfrey Phillips IndiaValueKanpurUttar PradeshFilter6920151.3160Yes1971
5Navy Cut 100sBlendedSlim/100sITC Ltd.PremiumKolkataWest BengalFilter10020111.0220No1980
6InsigniaBlendedKing Size (84mm)ITC Ltd.PremiumMumbaiMaharashtraFilter8420100.9600No2003
7CharminarBlendRegular (69–72mm)VST IndustriesValueHyderabadTelanganaNo Filter7010161.4140No1930
8MarlboroBlendedKing Size (84mm)Others/RegionalPremiumDelhiDelhiFilter8420121.0360No2008
9BristolBlendedRegular (69–72mm)ITC Ltd.ValuePatnaBiharFilter6920141.2170No1976
10CapstanBlendedRegular (69–72mm)Others/RegionalValueJaipurRajasthanFilter6920151.3165No1960
11Flake ExcelBlendedKing Size (84mm)ITC Ltd.Mid-PriceIndoreMadhya PradeshFilter8420121.1205No1992
12Four Square KingsBlendedKing Size (84mm)Godfrey Phillips IndiaMid-PriceAhmedabadGujaratFilter8410121.0210No1990
13CavandersBlendedRegular (69–72mm)Godfrey Phillips IndiaMid-PriceSuratGujaratFilter6920131.1175No1985
14Dunhill SwitchFlavoredKing Size (84mm)Others/RegionalPremiumBengaluruKarnatakaFilter8420100.8500Yes2012
15Classic MentholFlavoredKing Size (84mm)ITC Ltd.PremiumThaneMaharashtraFilter8420110.9340Yes2005
16DukeBlendRegular (69–72mm)VST IndustriesValueVijayawadaAndhra PradeshFilter7020151.3150No1974
17Gold Flake NeoBlendedKing Size (84mm)ITC Ltd.Mid-PriceNoidaUttar PradeshFilter8420121.0230No2018
18Navy Cut FilterBlendedRegular (69–72mm)ITC Ltd.Mid-PriceCoimbatoreTamil NaduFilter6910141.2185No1977
19Benson & HedgesBlendedKing Size (84mm)Others/RegionalPremiumChandigarhChandigarhFilter8420100.8520No2009
20Charminar SpecialBlendRegular (69–72mm)VST IndustriesValueWarangalTelanganaNo Filter7020171.5145No1955


3.DATA Step — derive calculated fields 

data cig_master_enriched;

    set cig_master;


    /* Average price per stick */

    Price_per_Stick = MRP_INR / Pack_Size;


    /* Simple tax model (illustrative only): base excise by size + ad valorem % on MRP */

    length Tax_Regime $40;  

    if Size='KS' then Base_Excise=2.5;

    else if Size='SLIM' then Base_Excise=3.0;

    else Base_Excise=2.0;


    AdValorem_Pct =

        (Segment='Premium')*0.52 +

        (Segment='Mid-Price')*0.45 +

        (Segment='Value')*0.40;


    Est_Tax = Base_Excise + (MRP_INR * AdValorem_Pct);

    Net_Realization = MRP_INR - Est_Tax;


    /* Risk proxy index (purely synthetic): higher tar/nicotine and menthol flag raise score */

    Risk_Index = 0.5*Tar_mg + 0.8*Nicotine_mg + 2*Menthol_Flag + (1-Filter_Flag)*2;


    /* Concatenate size and segment safely */

    Tax_Regime = catx('-', Size, Segment);


    label 

        Price_per_Stick = "MRP per Stick (INR)"

        Est_Tax         = "Estimated Indirect Tax (INR per pack)"

        Net_Realization = "MRP minus Est. Tax"

        Risk_Index      = "Synthetic Risk Index (higher=worse)"

        Tax_Regime      = "Size-Segment Tax Regime";

run;

proc print data=cig_master_enriched;

 var Brand Type Size Manufacturer Segment City State Price_per_Stick Base_Excise AdValorem_Pct Est_Tax

     Net_Realization Risk_Index Tax_Regime;

run;

Output:

ObsBrandTypeSizeManufacturerSegmentCityStatePrice_per_StickBase_ExciseAdValorem_PctEst_TaxNet_RealizationRisk_IndexTax_Regime
1Gold FlakeBlendedKing Size (84mm)ITC Ltd.Mid-PriceHyderabadTelangana10.002.502.5197.56.80KS-MID
2Wills Navy CutBlendedRegular (69–72mm)ITC Ltd.Mid-PriceChennaiTamil Nadu9.002.002.0178.07.96REG-MID
3Four SquareBlendedKing Size (84mm)Godfrey Phillips IndiaMid-PricePuneMaharashtra9.752.502.5192.57.38KS-MID
4CharmsFlavoredRegular (69–72mm)Godfrey Phillips IndiaValueKanpurUttar Pradesh8.002.002.0158.010.54REG-VAL
5Navy Cut 100sBlendedSlim/100sITC Ltd.PremiumKolkataWest Bengal11.003.003.0217.06.30SLIM-PREM
6InsigniaBlendedKing Size (84mm)ITC Ltd.PremiumMumbaiMaharashtra30.002.502.5597.55.72KS-PREM
7CharminarBlendRegular (69–72mm)VST IndustriesValueHyderabadTelangana14.002.002.0138.011.12REG-VAL
8MarlboroBlendedKing Size (84mm)Others/RegionalPremiumDelhiDelhi18.002.502.5357.56.80KS-PREM
9BristolBlendedRegular (69–72mm)ITC Ltd.ValuePatnaBihar8.502.002.0168.07.96REG-VAL
10CapstanBlendedRegular (69–72mm)Others/RegionalValueJaipurRajasthan8.252.002.0163.08.54REG-VAL
11Flake ExcelBlendedKing Size (84mm)ITC Ltd.Mid-PriceIndoreMadhya Pradesh10.252.502.5202.56.88KS-MID
12Four Square KingsBlendedKing Size (84mm)Godfrey Phillips IndiaMid-PriceAhmedabadGujarat21.002.502.5207.56.80KS-MID
13CavandersBlendedRegular (69–72mm)Godfrey Phillips IndiaMid-PriceSuratGujarat8.752.002.0173.07.38REG-MID
14Dunhill SwitchFlavoredKing Size (84mm)Others/RegionalPremiumBengaluruKarnataka25.002.502.5497.57.64KS-PREM
15Classic MentholFlavoredKing Size (84mm)ITC Ltd.PremiumThaneMaharashtra17.002.502.5337.58.22KS-PREM
16DukeBlendRegular (69–72mm)VST IndustriesValueVijayawadaAndhra Pradesh7.502.002.0148.08.54REG-VAL
17Gold Flake NeoBlendedKing Size (84mm)ITC Ltd.Mid-PriceNoidaUttar Pradesh11.502.502.5227.56.80KS-MID
18Navy Cut FilterBlendedRegular (69–72mm)ITC Ltd.Mid-PriceCoimbatoreTamil Nadu18.502.002.0183.07.96REG-MID
19Benson & HedgesBlendedKing Size (84mm)Others/RegionalPremiumChandigarhChandigarh26.002.502.5517.55.64KS-PREM
20Charminar SpecialBlendRegular (69–72mm)VST IndustriesValueWarangalTelangana7.252.002.0143.011.70REG-VAL


4.PROC CONTENTS — inspect structure 

proc contents data=cig_master_enriched varnum; 

run;

Output:

The CONTENTS Procedure

Data Set NameWORK.CIG_MASTER_ENRICHEDObservations20
Member TypeDATAVariables22
EngineV9Indexes0
Created09/04/2025 19:51:24Observation Length232
Last Modified09/04/2025 19:51:24Deleted Observations0
Protection CompressedNO
Data Set Type SortedNO
Label   
Data RepresentationSOLARIS_X86_64, LINUX_X86_64, ALPHA_TRU64, LINUX_IA64  
Encodingutf-8 Unicode (UTF-8)  
Engine/Host Dependent Information
Data Set Page Size131072
Number of Data Set Pages1
First Data Page1
Max Obs per Page564
Obs in First Data Page20
Number of Data Set Repairs0
Filename/saswork/SAS_work0A8D00002FAE_odaws01-apse1-2.oda.sas.com/SAS_work3F3500002FAE_odaws01-apse1-2.oda.sas.com/cig_master_enriched.sas7bdat
Release Created9.0401M8
Host CreatedLinux
Inode Number1085845
Access Permissionrw-r--r--
Owner Nameu63247146
File Size256KB
File Size (bytes)262144
Variables in Creation Order
#VariableTypeLenFormatLabel
1BrandChar24  
2TypeChar8  
3SizeChar5$SIZEFMT. 
4ManufacturerChar3$MANUFMT. 
5SegmentChar4$SEGFMT. 
6CityChar16  
7StateChar16  
8Filter_FlagNum8FILTERFMT. 
9Length_mmNum8  
10Pack_SizeNum8  
11Tar_mgNum8  
12Nicotine_mgNum8  
13MRP_INRNum8  
14Menthol_FlagNum8YESNO. 
15Launch_YearNum8  
16Price_per_StickNum8 MRP per Stick (INR)
17Tax_RegimeChar40 Size-Segment Tax Regime
18Base_ExciseNum8  
19AdValorem_PctNum8  
20Est_TaxNum8 Estimated Indirect Tax (INR per pack)
21Net_RealizationNum8 MRP minus Est. Tax
22Risk_IndexNum8 Synthetic Risk Index (higher=worse)

5.PROC SORT — prepare orders for analysis 

proc sort data=cig_master_enriched out=cig_sorted_by_price;

  by descending MRP_INR;

run;

proc print data=cig_sorted_by_price (obs=10) label;

  title "Top 10 MRP Packs";

  var Brand Manufacturer Segment Size MRP_INR Price_per_Stick Est_Tax Net_Realization;

run;

Output:

Top 10 MRP Packs

ObsBrandManufacturerSegmentSizeMRP_INRMRP per Stick (INR)Estimated Indirect Tax (INR per pack)MRP minus Est. Tax
1InsigniaITC Ltd.PremiumKing Size (84mm)60030.002.5597.5
2Benson & HedgesOthers/RegionalPremiumKing Size (84mm)52026.002.5517.5
3Dunhill SwitchOthers/RegionalPremiumKing Size (84mm)50025.002.5497.5
4MarlboroOthers/RegionalPremiumKing Size (84mm)36018.002.5357.5
5Classic MentholITC Ltd.PremiumKing Size (84mm)34017.002.5337.5
6Gold Flake NeoITC Ltd.Mid-PriceKing Size (84mm)23011.502.5227.5
7Navy Cut 100sITC Ltd.PremiumSlim/100s22011.003.0217.0
8Four Square KingsGodfrey Phillips IndiaMid-PriceKing Size (84mm)21021.002.5207.5
9Flake ExcelITC Ltd.Mid-PriceKing Size (84mm)20510.252.5202.5
10Gold FlakeITC Ltd.Mid-PriceKing Size (84mm)20010.002.5197.5

6.PROC FREQ — distributions  

proc freq data=cig_master_enriched;

  tables Manufacturer*Segment Size*Filter_Flag Menthol_Flag / nocol nopercent norow;

  title "Category Distributions by Manufacturer/Segment & Size/Filter";

run;

Output:

Category Distributions by Manufacturer/Segment & Size/Filter

The FREQ Procedure

Frequency
Table of Manufacturer by Segment
ManufacturerSegment
Mid-PricePremiumValueTotal
Godfrey Phillips India
3
0
1
4
ITC Ltd.
5
3
1
9
Others/Regional
0
3
1
4
VST Industries
0
0
3
3
Total
8
6
6
20
Frequency
Table of Size by Filter_Flag
SizeFilter_Flag
No FilterFilterTotal
King Size (84mm)
0
10
10
Regular (69–72mm)
2
7
9
Slim/100s
0
1
1
Total
2
18
20
Menthol_FlagFrequencyCumulative
Frequency
No1717
Yes320

7.PROC MEANS — summary stats

proc means data=cig_master_enriched n mean std min p25 median p75 max maxdec=2;

  class Segment;

  var MRP_INR Price_per_Stick Tar_mg Nicotine_mg Est_Tax Net_Realization Risk_Index;

  title "Summary Stats by Segment";

run;

Output:

Summary Stats by Segment

The MEANS Procedure

SegmentN ObsVariableLabelNMeanStd DevMinimum25th PctlMedian75th PctlMaximum
Mid-Price8
MRP_INR
Price_per_Stick
Tar_mg
Nicotine_mg
Est_Tax
Net_Realization
Risk_Index
 
MRP per Stick (INR)
 
 
Estimated Indirect Tax (INR per pack)
MRP minus Est. Tax
Synthetic Risk Index (higher=worse)
8
8
8
8
8
8
8
197.50
12.34
12.75
1.09
2.31
195.19
7.25
17.93
4.69
0.89
0.08
0.26
17.72
0.51
175.00
8.75
12.00
1.00
2.00
173.00
6.80
182.50
9.38
12.00
1.00
2.00
180.50
6.80
197.50
10.13
12.50
1.10
2.50
195.00
7.13
207.50
15.00
13.50
1.15
2.50
205.00
7.67
230.00
21.00
14.00
1.20
2.50
227.50
7.96
Premium6
MRP_INR
Price_per_Stick
Tar_mg
Nicotine_mg
Est_Tax
Net_Realization
Risk_Index
 
MRP per Stick (INR)
 
 
Estimated Indirect Tax (INR per pack)
MRP minus Est. Tax
Synthetic Risk Index (higher=worse)
6
6
6
6
6
6
6
423.33
21.17
10.67
0.90
2.58
420.75
6.72
140.52
7.03
0.82
0.09
0.20
140.67
1.04
220.00
11.00
10.00
0.80
2.50
217.00
5.64
340.00
17.00
10.00
0.80
2.50
337.50
5.72
430.00
21.50
10.50
0.90
2.50
427.50
6.55
520.00
26.00
11.00
1.00
2.50
517.50
7.64
600.00
30.00
12.00
1.00
3.00
597.50
8.22
Value6
MRP_INR
Price_per_Stick
Tar_mg
Nicotine_mg
Est_Tax
Net_Realization
Risk_Index
 
MRP per Stick (INR)
 
 
Estimated Indirect Tax (INR per pack)
MRP minus Est. Tax
Synthetic Risk Index (higher=worse)
6
6
6
6
6
6
6
155.00
8.92
15.33
1.33
2.00
153.00
9.73
11.83
2.53
1.03
0.10
0.00
11.83
1.58
140.00
7.25
14.00
1.20
2.00
138.00
7.96
145.00
7.50
15.00
1.30
2.00
143.00
8.54
155.00
8.13
15.00
1.30
2.00
153.00
9.54
165.00
8.50
16.00
1.40
2.00
163.00
11.12
170.00
14.00
17.00
1.50
2.00
168.00
11.70

8.PROC SUMMARY — grouped aggregates 

proc summary data=cig_master_enriched nway;

  class Manufacturer Segment;

  var MRP_INR Price_per_Stick Est_Tax;

  output out=agg_manuf (drop=_type_ _freq_) 

    n=Count mean(MRP_INR)=Avg_MRP mean(Price_per_Stick)=Avg_PPS mean(Est_Tax)=Avg_Tax;

run;

proc print;run;

Output:

ObsManufacturerSegmentCountAvg_MRPAvg_PPSAvg_Tax
1Godfrey Phillips IndiaMid-Price3193.33313.16672.33333
2Godfrey Phillips IndiaValue1160.0008.00002.00000
3ITC Ltd.Mid-Price5200.00011.85002.30000
4ITC Ltd.Premium3386.66719.33332.66667
5ITC Ltd.Value1170.0008.50002.00000
6Others/RegionalPremium3460.00023.00002.50000
7Others/RegionalValue1165.0008.25002.00000
8VST IndustriesValue3145.0009.58332.00000


9.PROC UNIVARIATE — distribution diagnostics

proc univariate data=cig_master_enriched;

  var Price_per_Stick Tar_mg Nicotine_mg;

  histogram Price_per_Stick Tar_mg Nicotine_mg;

  inset n mean std skewness kurtosis / position=ne;

  title "Univariate Diagnostics for Key Measures";

run;

Output:

Univariate Diagnostics for Key Measures

The UNIVARIATE Procedure

Variable: Price_per_Stick (MRP per Stick (INR))

Moments
N20Sum Weights20
Mean13.9625Sum Observations279.25
Std Deviation6.95203255Variance48.3307566
Skewness1.06568565Kurtosis-0.0005827
Uncorrected SS4817.3125Corrected SS918.284375
Coeff Variation49.7907434Std Error Mean1.55452174
Basic Statistical Measures
LocationVariability
Mean13.96250Std Deviation6.95203
Median10.62500Variance48.33076
Mode.Range22.75000
  Interquartile Range9.62500
Tests for Location: Mu0=0
TestStatisticp Value
Student's tt8.981862Pr > |t|<.0001
SignM10Pr >= |M|<.0001
Signed RankS105Pr >= |S|<.0001
Quantiles (Definition 5)
LevelQuantile
100% Max30.000
99%30.000
95%28.000
90%25.500
75% Q318.250
50% Median10.625
25% Q18.625
10%7.750
5%7.375
1%7.250
0% Min7.250
Extreme Observations
LowestHighest
ValueObsValueObs
7.252018.518
7.501621.012
8.00425.014
8.251026.019
8.50930.06

Univariate Diagnostics for Key Measures

The UNIVARIATE Procedure

Histogram for Price_per_Stick

Univariate Diagnostics for Key Measures

The UNIVARIATE Procedure

Variable: Tar_mg

Moments
N20Sum Weights20
Mean12.9Sum Observations258
Std Deviation2.04939015Variance4.2
Skewness0.271491Kurtosis-0.7577768
Uncorrected SS3408Corrected SS79.8
Coeff Variation15.8867454Std Error Mean0.45825757
Basic Statistical Measures
LocationVariability
Mean12.90000Std Deviation2.04939
Median12.50000Variance4.20000
Mode12.00000Range7.00000
  Interquartile Range3.00000
Tests for Location: Mu0=0
TestStatisticp Value
Student's tt28.15011Pr > |t|<.0001
SignM10Pr >= |M|<.0001
Signed RankS105Pr >= |S|<.0001
Quantiles (Definition 5)
LevelQuantile
100% Max17.0
99%17.0
95%16.5
90%15.5
75% Q314.5
50% Median12.5
25% Q111.5
10%10.0
5%10.0
1%10.0
0% Min10.0
Extreme Observations
LowestHighest
ValueObsValueObs
1019154
10141510
1061516
1115167
1151720

Univariate Diagnostics for Key Measures

The UNIVARIATE Procedure

Histogram for Tar_mg

Univariate Diagnostics for Key Measures

The UNIVARIATE Procedure

Variable: Nicotine_mg

Moments
N20Sum Weights20
Mean1.105Sum Observations22.1
Std Deviation0.19324105Variance0.03734211
Skewness0.2622087Kurtosis-0.5372647
Uncorrected SS25.13Corrected SS0.7095
Coeff Variation17.4878783Std Error Mean0.04321001
Basic Statistical Measures
LocationVariability
Mean1.105000Std Deviation0.19324
Median1.100000Variance0.03734
Mode1.000000Range0.70000
  Interquartile Range0.25000
Tests for Location: Mu0=0
TestStatisticp Value
Student's tt25.57278Pr > |t|<.0001
SignM10Pr >= |M|<.0001
Signed RankS105Pr >= |S|<.0001
Quantiles (Definition 5)
LevelQuantile
100% Max1.50
99%1.50
95%1.45
90%1.35
75% Q31.25
50% Median1.10
25% Q11.00
10%0.85
5%0.80
1%0.80
0% Min0.80
Extreme Observations
LowestHighest
ValueObsValueObs
0.8191.34
0.8141.310
0.9151.316
0.961.47
1.0171.520

Univariate Diagnostics for Key Measures

The UNIVARIATE Procedure

Histogram for Nicotine_mg

10.PROC TABULATE — pivot-style table 

proc tabulate data=cig_master_enriched format=8.2;

  class Manufacturer Segment Size;

  var MRP_INR Price_per_Stick Est_Tax;

  table Manufacturer,

        Segment*Size*(MRP_INR*mean Price_per_Stick*mean Est_Tax*mean);

  title "Manufacturer × Segment × Size — Average Price & Tax";

run;

Output:

Manufacturer × Segment × Size — Average Price & Tax

 Segment
Mid-PricePremiumValue
SizeSizeSize
King Size (84mm)Regular (69–72mm)King Size (84mm)Slim/100sRegular (69–72mm)
MRP_INRMRP per Stick (INR)Estimated Indirect Tax (INR per pack)MRP_INRMRP per Stick (INR)Estimated Indirect Tax (INR per pack)MRP_INRMRP per Stick (INR)Estimated Indirect Tax (INR per pack)MRP_INRMRP per Stick (INR)Estimated Indirect Tax (INR per pack)MRP_INRMRP per Stick (INR)Estimated Indirect Tax (INR per pack)
MeanMeanMeanMeanMeanMeanMeanMeanMeanMeanMeanMeanMeanMeanMean
Manufacturer202.5015.382.50175.008.752.00......160.008.002.00
Godfrey Phillips India
ITC Ltd.211.6710.582.50182.5013.752.00470.0023.502.50220.0011.003.00170.008.502.00
Others/Regional......460.0023.002.50...165.008.252.00
VST Industries............145.009.582.00

11.PROC REPORT — styled reporting 

proc report data=agg_manuf nowd;

  columns Manufacturer Segment Count Avg_MRP Avg_PPS Avg_Tax;

  define Manufacturer / group 'Manufacturer';

  define Segment / group 'Segment';

  define Count / analysis 'N';

  define Avg_MRP / analysis mean format=8.2 'Avg MRP';

  define Avg_PPS / analysis mean format=8.3 'Avg Price/Stick';

  define Avg_Tax / analysis mean format=8.2 'Avg Est. Tax';

  title "Aggregated Manufacturer-Segment Report";

run;

Output:

Aggregated Manufacturer-Segment Report

ManufacturerSegmentNAvg MRPAvg Price
Stick
Avg Est. Tax
Godfrey Phillips IndiaMid-Price3193.3313.1672.33
 Value1160.008.0002.00
ITC Ltd.Mid-Price5200.0011.8502.30
 Premium3386.6719.3332.67
 Value1170.008.5002.00
Others/RegionalPremium3460.0023.0002.50
 Value1165.008.2502.00
VST IndustriesValue3145.009.5832.00

12.PROC TRANSPOSE — wide/long reshaping  

proc transpose data=cig_master_enriched out=price_wide prefix=MRP_;

  by Manufacturer notsorted;

  id Brand;

  var MRP_INR;

run;

proc print data=price_wide(obs=10);

run;

Output:

ObsManufacturer_NAME_MRP_Gold FlakeMRP_Wills Navy CutMRP_Four SquareMRP_CharmsMRP_Navy Cut 100sMRP_InsigniaMRP_CharminarMRP_MarlboroMRP_BristolMRP_CapstanMRP_Flake ExcelMRP_Four Square KingsMRP_CavandersMRP_Dunhill SwitchMRP_Classic MentholMRP_DukeMRP_Gold Flake NeoMRP_Navy Cut FilterMRP_Benson & HedgesMRP_Charminar Special
1ITC Ltd.MRP_INR200180..................
2Godfrey Phillips IndiaMRP_INR..195160................
3ITC Ltd.MRP_INR....220600..............
4VST IndustriesMRP_INR......140.............
5Others/RegionalMRP_INR.......360............
6ITC Ltd.MRP_INR........170...........
7Others/RegionalMRP_INR.........165..........
8ITC Ltd.MRP_INR..........205.........
9Godfrey Phillips IndiaMRP_INR...........210175.......
10Others/RegionalMRP_INR.............500......


13.PROC SQL — queries & joins  

proc sql noprint;

  create table city_region as

  select distinct City, State,

         case

           when State in ('Maharashtra','Gujarat') then 'West'

           when State in ('Telangana','Andhra Pradesh','Karnataka','Tamil Nadu') then 'South'

           when State in ('Uttar Pradesh','Bihar') then 'North-Central'

           when State in ('Delhi','Chandigarh','Rajasthan') then 'North'

           when State in ('West Bengal') then 'East'

           else 'Other'

         end as Region length=14

  from cig_master_enriched;


  create table cig_with_region as

  select a.*, b.Region

  from cig_master_enriched as a

  left join city_region as b

    on a.City=b.City and a.State=b.State;


  create table region_avgs as

  select Region, Segment,

         count(*) as N,

         mean(MRP_INR) as Avg_MRP,

         mean(Price_per_Stick) as Avg_PPS,

         mean(Est_Tax) as Avg_Tax

  from cig_with_region

  group by Region, Segment;

quit;

proc print data=region_avgs;

run;

Output:

ObsRegionSegmentNAvg_MRPAvg_PPSAvg_Tax
1EastPremium1220.00011.00003.00000
2NorthPremium2440.00022.00002.50000
3NorthValue1165.0008.25002.00000
4North-CentralMid-Price1230.00011.50002.50000
5North-CentralValue2165.0008.25002.00000
6OtherMid-Price1205.00010.25002.50000
7SouthMid-Price3188.33312.50002.16667
8SouthPremium1500.00025.00002.50000
9SouthValue3145.0009.58332.00000
10WestMid-Price3193.33313.16672.33333
11WestPremium2470.00023.50002.50000


14.PROC RANK — rank brands by price per stick

proc rank data=cig_master_enriched out=ranked ties=low descending;

  var Price_per_Stick;

  ranks Rank_PPS;

run;

proc print;run;

Output:

ObsBrandTypeSizeManufacturerSegmentCityStateFilter_FlagLength_mmPack_SizeTar_mgNicotine_mgMRP_INRMenthol_FlagLaunch_YearPrice_per_StickTax_RegimeBase_ExciseAdValorem_PctEst_TaxNet_RealizationRisk_IndexRank_PPS
1Gold FlakeBlendedKing Size (84mm)ITC Ltd.Mid-PriceHyderabadTelanganaFilter8420121.0200No197110.00KS-MID2.502.5197.56.8012
2Wills Navy CutBlendedRegular (69–72mm)ITC Ltd.Mid-PriceChennaiTamil NaduFilter6920141.2180No19639.00REG-MID2.002.0178.07.9614
3Four SquareBlendedKing Size (84mm)Godfrey Phillips IndiaMid-PricePuneMaharashtraFilter8420131.1195No19739.75KS-MID2.502.5192.57.3813
4CharmsFlavoredRegular (69–72mm)Godfrey Phillips IndiaValueKanpurUttar PradeshFilter6920151.3160Yes19718.00REG-VAL2.002.0158.010.5418
5Navy Cut 100sBlendedSlim/100sITC Ltd.PremiumKolkataWest BengalFilter10020111.0220No198011.00SLIM-PREM3.003.0217.06.3010
6InsigniaBlendedKing Size (84mm)ITC Ltd.PremiumMumbaiMaharashtraFilter8420100.9600No200330.00KS-PREM2.502.5597.55.721
7CharminarBlendRegular (69–72mm)VST IndustriesValueHyderabadTelanganaNo Filter7010161.4140No193014.00REG-VAL2.002.0138.011.128
8MarlboroBlendedKing Size (84mm)Others/RegionalPremiumDelhiDelhiFilter8420121.0360No200818.00KS-PREM2.502.5357.56.806
9BristolBlendedRegular (69–72mm)ITC Ltd.ValuePatnaBiharFilter6920141.2170No19768.50REG-VAL2.002.0168.07.9616
10CapstanBlendedRegular (69–72mm)Others/RegionalValueJaipurRajasthanFilter6920151.3165No19608.25REG-VAL2.002.0163.08.5417
11Flake ExcelBlendedKing Size (84mm)ITC Ltd.Mid-PriceIndoreMadhya PradeshFilter8420121.1205No199210.25KS-MID2.502.5202.56.8811
12Four Square KingsBlendedKing Size (84mm)Godfrey Phillips IndiaMid-PriceAhmedabadGujaratFilter8410121.0210No199021.00KS-MID2.502.5207.56.804
13CavandersBlendedRegular (69–72mm)Godfrey Phillips IndiaMid-PriceSuratGujaratFilter6920131.1175No19858.75REG-MID2.002.0173.07.3815
14Dunhill SwitchFlavoredKing Size (84mm)Others/RegionalPremiumBengaluruKarnatakaFilter8420100.8500Yes201225.00KS-PREM2.502.5497.57.643
15Classic MentholFlavoredKing Size (84mm)ITC Ltd.PremiumThaneMaharashtraFilter8420110.9340Yes200517.00KS-PREM2.502.5337.58.227
16DukeBlendRegular (69–72mm)VST IndustriesValueVijayawadaAndhra PradeshFilter7020151.3150No19747.50REG-VAL2.002.0148.08.5419
17Gold Flake NeoBlendedKing Size (84mm)ITC Ltd.Mid-PriceNoidaUttar PradeshFilter8420121.0230No201811.50KS-MID2.502.5227.56.809
18Navy Cut FilterBlendedRegular (69–72mm)ITC Ltd.Mid-PriceCoimbatoreTamil NaduFilter6910141.2185No197718.50REG-MID2.002.0183.07.965
19Benson & HedgesBlendedKing Size (84mm)Others/RegionalPremiumChandigarhChandigarhFilter8420100.8520No200926.00KS-PREM2.502.5517.55.642
20Charminar SpecialBlendRegular (69–72mm)VST IndustriesValueWarangalTelanganaNo Filter7020171.5145No19557.25REG-VAL2.002.0143.011.7020


15.PROC SGPLOT — simple visuals 

title "Price per Stick by Segment";

proc sgplot data=ranked;

  vbox Price_per_Stick / category=Segment;

  yaxis label="INR per Stick";

run;


title "MRP vs Estimated Tax (Bubble by Tar mg)";

proc sgplot data=cig_master_enriched;

  bubble x=MRP_INR y=Est_Tax size=Tar_mg / transparency=0.1;

  refline 200 300 400 / axis=x;

  xaxis label="MRP (INR per pack)";

  yaxis label="Estimated Tax (INR)";

run;

Output:



The SGPlot Procedure

16.Macro %segment_filter — subset by segment 

%macro segment_filter(seg=Premium);

  proc sql;

    create table seg_&seg as

    select * from cig_master_enriched

    where put(Segment,$segfmt.)="&seg";

  quit;


  proc means data=seg_&seg n mean std min max maxdec=2;

    var MRP_INR Price_per_Stick Est_Tax Risk_Index;

    title "Segment &seg — Key Stats";

  run;

%mend;


%segment_filter(seg=Premium);

Output:

Segment Premium — Key Stats

The MEANS Procedure

VariableLabelNMeanStd DevMinimumMaximum
MRP_INR
Price_per_Stick
Est_Tax
Risk_Index
 
MRP per Stick (INR)
Estimated Indirect Tax (INR per pack)
Synthetic Risk Index (higher=worse)
6
6
6
6
423.33
21.17
2.58
6.72
140.52
7.03
0.20
1.04
220.00
11.00
2.50
5.64
600.00
30.00
3.00
8.22

%segment_filter(seg=Value);

Output:

Segment Value — Key Stats

The MEANS Procedure

VariableLabelNMeanStd DevMinimumMaximum
MRP_INR
Price_per_Stick
Est_Tax
Risk_Index
 
MRP per Stick (INR)
Estimated Indirect Tax (INR per pack)
Synthetic Risk Index (higher=worse)
6
6
6
6
155.00
8.92
2.00
9.73
11.83
2.53
0.00
1.58
140.00
7.25
2.00
7.96
170.00
14.00
2.00
11.70

17.Macro %price_band — create bands & counts 

%macro price_band(step=50, max=650);

  data banded;

    set cig_master_enriched;

    length Price_Band $12;

    Band_Low = floor(MRP_INR/&step.)*&step.;

    Band_High = Band_Low + &step.;

    Price_Band = cats(Band_Low,'-',Band_High);

  run;


  proc freq data=banded;

    tables Price_Band / nocum nopercent;

    title "Pack Price Bands (&step. INR step) — Counts";

  run;

%mend;


%price_band(step=50, max=650);

Output:

Pack Price Bands (50 INR step) — Counts

The FREQ Procedure

Price_BandFrequency
100-1502
150-2008
200-2505
300-3501
350-4001
500-5502
600-6501

18.Macro %tax_sensitivity — simulate tax change 

%macro tax_sensitivity(adval_delta=0.05);

  data scenario_tax;

    set cig_master_enriched;

    New_AdValorem = AdValorem_Pct + &adval_delta.;

    New_Est_Tax = Base_Excise + (MRP_INR * New_AdValorem);

    New_Net_Realization = MRP_INR - New_Est_Tax;

    Impact_Net = New_Net_Realization - Net_Realization;

  run;


  proc means data=scenario_tax n mean min p25 median p75 max maxdec=2;

    class Segment;

    var Impact_Net New_Est_Tax;

    title "Tax Sensitivity (Ad Valorem +&adval_delta.) — Impact on Net Realization";

  run;

%mend;


%tax_sensitivity(adval_delta=0.03);  

Output:

Tax Sensitivity (Ad Valorem +0.03) — Impact on Net Realization

The MEANS Procedure

SegmentN ObsVariableNMeanMinimum25th PctlMedian75th PctlMaximum
Mid-Price8
Impact_Net
New_Est_Tax
8
8
-5.93
8.24
-6.90
7.25
-6.23
7.48
-5.92
8.43
-5.48
8.73
-5.25
9.40
Premium6
Impact_Net
New_Est_Tax
6
6
-12.70
15.28
-18.00
9.60
-15.60
12.70
-12.90
15.40
-10.20
18.10
-6.60
20.50
Value6
Impact_Net
New_Est_Tax
6
6
-4.65
6.65
-5.10
6.20
-4.95
6.35
-4.65
6.65
-4.35
6.95
-4.20
7.10

%tax_sensitivity(adval_delta=-0.02); 

Output:

Tax Sensitivity (Ad Valorem +0.03) — Impact on Net Realization

The MEANS Procedure

SegmentN ObsVariableNMeanMinimum25th PctlMedian75th PctlMaximum
Mid-Price8
Impact_Net
New_Est_Tax
8
8
-5.93
8.24
-6.90
7.25
-6.23
7.48
-5.92
8.43
-5.48
8.73
-5.25
9.40
Premium6
Impact_Net
New_Est_Tax
6
6
-12.70
15.28
-18.00
9.60
-15.60
12.70
-12.90
15.40
-10.20
18.10
-6.60
20.50
Value6
Impact_Net
New_Est_Tax
6
6
-4.65
6.65
-5.10
6.20
-4.95
6.35
-4.65
6.65
-4.35
6.95
-4.20
7.10

Tax Sensitivity (Ad Valorem +-0.02) — Impact on Net Realization

The MEANS Procedure

SegmentN ObsVariableNMeanMinimum25th PctlMedian75th PctlMaximum
Mid-Price8
Impact_Net
New_Est_Tax
8
8
3.95
-1.64
3.50
-2.10
3.65
-1.70
3.95
-1.60
4.15
-1.50
4.60
-1.40
Premium6
Impact_Net
New_Est_Tax
6
6
8.47
-5.88
4.40
-9.50
6.80
-7.90
8.60
-6.10
10.40
-4.30
12.00
-1.40
Value6
Impact_Net
New_Est_Tax
6
6
3.10
-1.10
2.80
-1.40
2.90
-1.30
3.10
-1.10
3.30
-0.90
3.40
-0.80



To Visit My Previous E-Commerce Dataset:Click Here
To Visit My Previous Length,Input,Retain Statements:Click Here
To Visit My Previous Urban Traffic Dataset:Click Here
To Visit My Previous Home Energy Consumption Dataset:Click Here







Follow Us On : 


 


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




No comments:

Post a Comment