253.REAL-WORLD TAXES IN INDIA ANALYSIS USING PROC PRINT | PROC SORT | PROC MEANS | PROC FREQ | PROC TRANSPOSE | PROC SQL | MACROS IN SAS
- Get link
- X
- Other Apps
REAL-WORLD TAXES IN INDIA ANALYSIS USING PROC PRINT | PROC SORT | PROC MEANS | PROC FREQ | PROC TRANSPOSE | PROC SQL | MACROS IN SAS
/*Creating a real-world style dataset for different types of taxes in India*/
STEP 1: CREATE THE REAL-WORLD TAXES DATASET FOR INDIA
options nocenter;
data taxes_india;
length Tax_Type $30 Category $10 Applicable_To $20 State $20 Notes $100;
infile datalines dsd dlm=' ';
input Tax_ID
Tax_Type :$30.
Category :$10.
Applicable_To :$20.
State :$20.
Rate_Percent
Year
Revenue_Collected_Cr
Notes :& $100.;
datalines;
1 Income_Tax Direct Individual All_India 5 2024 750000 "5% slab up to 5 lakh"
2 Income_Tax Direct Individual All_India 20 2024 1250000 "20% slab 5-10 lakh"
3 Income_Tax Direct Individual All_India 30 2024 2200000 "Above 10 lakh"
4 Corporate_Tax Direct Company All_India 25 2024 1500000 "Domestic companies turnover<400cr"
5 Corporate_Tax Direct Company All_India 30 2024 1800000 "Other companies"
6 CGST Indirect Both All_India 9 2024 3200000 "Central GST component"
7 SGST Indirect Both Karnataka 9 2024 1800000 "State GST Karnataka"
8 SGST Indirect Both Maharashtra 9 2024 2200000 "State GST Maharashtra"
9 IGST Indirect Both All_India 18 2024 4500000 "Interstate GST"
10 Property_Tax Direct Both Delhi 1 2024 50000 "Municipal property tax"
11 Property_Tax Direct Both Mumbai 1 2024 70000 "Municipal property tax"
12 Road_Tax Direct Both Telangana 8 2024 90000 "Vehicle lifetime tax"
13 Road_Tax Direct Both TamilNadu 10 2024 85000 "Vehicle lifetime tax"
14 Professional_Tax Direct Individual Maharashtra 2500 2024 45000 "Annual profession tax"
15 Professional_Tax Direct Individual Karnataka 2400 2024 35000 "Annual profession tax"
16 Capital_Gains_Tax Direct Individual All_India 10 2024 600000 "Long-term capital gains"
17 Capital_Gains_Tax Direct Individual All_India 15 2024 400000 "Short-term capital gains"
18 Customs_Duty Indirect Both All_India 10 2024 800000 "Imports"
19 Excise_Duty Indirect Both All_India 12 2024 500000 "Petroleum, tobacco"
20 Stamp_Duty Direct Both Telangana 6 2024 70000 "Property registration"
21 Stamp_Duty Direct Both Maharashtra 5 2024 95000 "Property registration"
22 TDS Direct Both All_India 10 2024 200000 "Tax deducted at source"
23 Service_Tax Indirect Both All_India 15 2016 1200000 "Pre-GST era"
24 Wealth_Tax Direct Individual All_India 1 2015 50000 "Abolished post 2015"
25 Entertainment_Tax Indirect Both Delhi 15 2016 75000 "Pre-GST era"
26 Luxury_Tax Indirect Both Goa 10 2016 65000 "Hotels, luxury items pre-GST"
27 GST_Compensation_Cess Indirect Both All_India 12 2024 400000 "Luxury and sin goods"
;
run;
proc print;run;
Output:
Obs | Tax_Type | Category | Applicable_To | State | Notes | Tax_ID | Rate_Percent | Year | Revenue_Collected_Cr |
---|---|---|---|---|---|---|---|---|---|
1 | Income_Tax | Direct | Individual | All_India | 5% slab up to 5 lakh | 1 | 5 | 2024 | 750000 |
2 | Income_Tax | Direct | Individual | All_India | 20% slab 5-10 lakh | 2 | 20 | 2024 | 1250000 |
3 | Income_Tax | Direct | Individual | All_India | Above 10 lakh | 3 | 30 | 2024 | 2200000 |
4 | Corporate_Tax | Direct | Company | All_India | Domestic companies turnover<400cr | 4 | 25 | 2024 | 1500000 |
5 | Corporate_Tax | Direct | Company | All_India | Other companies | 5 | 30 | 2024 | 1800000 |
6 | CGST | Indirect | Both | All_India | Central GST component | 6 | 9 | 2024 | 3200000 |
7 | SGST | Indirect | Both | Karnataka | State GST Karnataka | 7 | 9 | 2024 | 1800000 |
8 | SGST | Indirect | Both | Maharashtra | State GST Maharashtra | 8 | 9 | 2024 | 2200000 |
9 | IGST | Indirect | Both | All_India | Interstate GST | 9 | 18 | 2024 | 4500000 |
10 | Property_Tax | Direct | Both | Delhi | Municipal property tax | 10 | 1 | 2024 | 50000 |
11 | Property_Tax | Direct | Both | Mumbai | Municipal property tax | 11 | 1 | 2024 | 70000 |
12 | Road_Tax | Direct | Both | Telangana | Vehicle lifetime tax | 12 | 8 | 2024 | 90000 |
13 | Road_Tax | Direct | Both | TamilNadu | Vehicle lifetime tax | 13 | 10 | 2024 | 85000 |
14 | Professional_Tax | Direct | Individual | Maharashtra | Annual profession tax | 14 | 2500 | 2024 | 45000 |
15 | Professional_Tax | Direct | Individual | Karnataka | Annual profession tax | 15 | 2400 | 2024 | 35000 |
16 | Capital_Gains_Tax | Direct | Individual | All_India | Long-term capital gains | 16 | 10 | 2024 | 600000 |
17 | Capital_Gains_Tax | Direct | Individual | All_India | Short-term capital gains | 17 | 15 | 2024 | 400000 |
18 | Customs_Duty | Indirect | Both | All_India | Imports | 18 | 10 | 2024 | 800000 |
19 | Excise_Duty | Indirect | Both | All_India | Petroleum, tobacco | 19 | 12 | 2024 | 500000 |
20 | Stamp_Duty | Direct | Both | Telangana | Property registration | 20 | 6 | 2024 | 70000 |
21 | Stamp_Duty | Direct | Both | Maharashtra | Property registration | 21 | 5 | 2024 | 95000 |
22 | TDS | Direct | Both | All_India | Tax deducted at source | 22 | 10 | 2024 | 200000 |
23 | Service_Tax | Indirect | Both | All_India | Pre-GST era | 23 | 15 | 2016 | 1200000 |
24 | Wealth_Tax | Direct | Individual | All_India | Abolished post 2015 | 24 | 1 | 2015 | 50000 |
25 | Entertainment_Tax | Indirect | Both | Delhi | Pre-GST era | 25 | 15 | 2016 | 75000 |
26 | Luxury_Tax | Indirect | Both | Goa | Hotels, luxury items pre-GST | 26 | 10 | 2016 | 65000 |
27 | GST_Compensation_Cess | Indirect | Both | All_India | Luxury and sin goods | 27 | 12 | 2024 | 400000 |
STEP 2: Display the created dataset
proc print data=taxes_india (obs=15);
title "REAL-WORLD TAXES DATASET IN INDIA";
run;
Output:
REAL-WORLD TAXES DATASET IN INDIA
Obs | Tax_Type | Category | Applicable_To | State | Notes | Tax_ID | Rate_Percent | Year | Revenue_Collected_Cr |
---|---|---|---|---|---|---|---|---|---|
1 | Income_Tax | Direct | Individual | All_India | 5% slab up to 5 lakh | 1 | 5 | 2024 | 750000 |
2 | Income_Tax | Direct | Individual | All_India | 20% slab 5-10 lakh | 2 | 20 | 2024 | 1250000 |
3 | Income_Tax | Direct | Individual | All_India | Above 10 lakh | 3 | 30 | 2024 | 2200000 |
4 | Corporate_Tax | Direct | Company | All_India | Domestic companies turnover<400cr | 4 | 25 | 2024 | 1500000 |
5 | Corporate_Tax | Direct | Company | All_India | Other companies | 5 | 30 | 2024 | 1800000 |
6 | CGST | Indirect | Both | All_India | Central GST component | 6 | 9 | 2024 | 3200000 |
7 | SGST | Indirect | Both | Karnataka | State GST Karnataka | 7 | 9 | 2024 | 1800000 |
8 | SGST | Indirect | Both | Maharashtra | State GST Maharashtra | 8 | 9 | 2024 | 2200000 |
9 | IGST | Indirect | Both | All_India | Interstate GST | 9 | 18 | 2024 | 4500000 |
10 | Property_Tax | Direct | Both | Delhi | Municipal property tax | 10 | 1 | 2024 | 50000 |
11 | Property_Tax | Direct | Both | Mumbai | Municipal property tax | 11 | 1 | 2024 | 70000 |
12 | Road_Tax | Direct | Both | Telangana | Vehicle lifetime tax | 12 | 8 | 2024 | 90000 |
13 | Road_Tax | Direct | Both | TamilNadu | Vehicle lifetime tax | 13 | 10 | 2024 | 85000 |
14 | Professional_Tax | Direct | Individual | Maharashtra | Annual profession tax | 14 | 2500 | 2024 | 45000 |
15 | Professional_Tax | Direct | Individual | Karnataka | Annual profession tax | 15 | 2400 | 2024 | 35000 |
STEP 3: SORT THE DATA BY REVENUE COLLECTION
proc sort data=taxes_india out=taxes_sorted;
by descending Revenue_Collected_Cr;
run;
proc print data=taxes_sorted;
title "Taxes in India Sorted by Revenue Collection";
run;
Output:
Taxes in India Sorted by Revenue Collection
Obs | Tax_Type | Category | Applicable_To | State | Notes | Tax_ID | Rate_Percent | Year | Revenue_Collected_Cr |
---|---|---|---|---|---|---|---|---|---|
1 | IGST | Indirect | Both | All_India | Interstate GST | 9 | 18 | 2024 | 4500000 |
2 | CGST | Indirect | Both | All_India | Central GST component | 6 | 9 | 2024 | 3200000 |
3 | Income_Tax | Direct | Individual | All_India | Above 10 lakh | 3 | 30 | 2024 | 2200000 |
4 | SGST | Indirect | Both | Maharashtra | State GST Maharashtra | 8 | 9 | 2024 | 2200000 |
5 | Corporate_Tax | Direct | Company | All_India | Other companies | 5 | 30 | 2024 | 1800000 |
6 | SGST | Indirect | Both | Karnataka | State GST Karnataka | 7 | 9 | 2024 | 1800000 |
7 | Corporate_Tax | Direct | Company | All_India | Domestic companies turnover<400cr | 4 | 25 | 2024 | 1500000 |
8 | Income_Tax | Direct | Individual | All_India | 20% slab 5-10 lakh | 2 | 20 | 2024 | 1250000 |
9 | Service_Tax | Indirect | Both | All_India | Pre-GST era | 23 | 15 | 2016 | 1200000 |
10 | Customs_Duty | Indirect | Both | All_India | Imports | 18 | 10 | 2024 | 800000 |
11 | Income_Tax | Direct | Individual | All_India | 5% slab up to 5 lakh | 1 | 5 | 2024 | 750000 |
12 | Capital_Gains_Tax | Direct | Individual | All_India | Long-term capital gains | 16 | 10 | 2024 | 600000 |
13 | Excise_Duty | Indirect | Both | All_India | Petroleum, tobacco | 19 | 12 | 2024 | 500000 |
14 | Capital_Gains_Tax | Direct | Individual | All_India | Short-term capital gains | 17 | 15 | 2024 | 400000 |
15 | GST_Compensation_Cess | Indirect | Both | All_India | Luxury and sin goods | 27 | 12 | 2024 | 400000 |
16 | TDS | Direct | Both | All_India | Tax deducted at source | 22 | 10 | 2024 | 200000 |
17 | Stamp_Duty | Direct | Both | Maharashtra | Property registration | 21 | 5 | 2024 | 95000 |
18 | Road_Tax | Direct | Both | Telangana | Vehicle lifetime tax | 12 | 8 | 2024 | 90000 |
19 | Road_Tax | Direct | Both | TamilNadu | Vehicle lifetime tax | 13 | 10 | 2024 | 85000 |
20 | Entertainment_Tax | Indirect | Both | Delhi | Pre-GST era | 25 | 15 | 2016 | 75000 |
21 | Property_Tax | Direct | Both | Mumbai | Municipal property tax | 11 | 1 | 2024 | 70000 |
22 | Stamp_Duty | Direct | Both | Telangana | Property registration | 20 | 6 | 2024 | 70000 |
23 | Luxury_Tax | Indirect | Both | Goa | Hotels, luxury items pre-GST | 26 | 10 | 2016 | 65000 |
24 | Property_Tax | Direct | Both | Delhi | Municipal property tax | 10 | 1 | 2024 | 50000 |
25 | Wealth_Tax | Direct | Individual | All_India | Abolished post 2015 | 24 | 1 | 2015 | 50000 |
26 | Professional_Tax | Direct | Individual | Maharashtra | Annual profession tax | 14 | 2500 | 2024 | 45000 |
27 | Professional_Tax | Direct | Individual | Karnataka | Annual profession tax | 15 | 2400 | 2024 | 35000 |
STEP 4: SUMMARY STATISTICS USING PROC MEANS
proc means data=taxes_india mean min max sum;
var Rate_Percent Revenue_Collected_Cr;
class Category;
title "Summary Statistics of Tax Rates and Revenue by Category";
run;
Output:
Summary Statistics of Tax Rates and Revenue by Category
The MEANS Procedure
Category | N Obs | Variable | Mean | Minimum | Maximum | Sum |
---|---|---|---|---|---|---|
Direct | 17 | Rate_Percent Revenue_Collected_Cr | 298.6470588 546470.59 | 1.0000000 35000.00 | 2500.00 2200000.00 | 5077.00 9290000.00 |
Indirect | 10 | Rate_Percent Revenue_Collected_Cr | 11.9000000 1474000.00 | 9.0000000 65000.00 | 18.0000000 4500000.00 | 119.0000000 14740000.00 |
STEP 5: FREQUENCY DISTRIBUTION OF TAX TYPES AND STATES
proc freq data=taxes_india;
tables Category Applicable_To State;
title "Frequency Distribution of Taxes by Category, Payer Type, and State";
run;
Output:
Frequency Distribution of Taxes by Category, Payer Type, and State
The FREQ Procedure
Category | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
---|---|---|---|---|
Direct | 17 | 62.96 | 17 | 62.96 |
Indirect | 10 | 37.04 | 27 | 100.00 |
Applicable_To | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
---|---|---|---|---|
Both | 17 | 62.96 | 17 | 62.96 |
Company | 2 | 7.41 | 19 | 70.37 |
Individual | 8 | 29.63 | 27 | 100.00 |
State | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
---|---|---|---|---|
All_India | 15 | 55.56 | 15 | 55.56 |
Delhi | 2 | 7.41 | 17 | 62.96 |
Goa | 1 | 3.70 | 18 | 66.67 |
Karnataka | 2 | 7.41 | 20 | 74.07 |
Maharashtra | 3 | 11.11 | 23 | 85.19 |
Mumbai | 1 | 3.70 | 24 | 88.89 |
TamilNadu | 1 | 3.70 | 25 | 92.59 |
Telangana | 2 | 7.41 | 27 | 100.00 |
STEP 6: TRANSPOSE FOR YEAR-WISE REVENUE COMPARISON
proc sort data=taxes_india out=taxes_sorted;
by Tax_Type Year;
run;
proc sql;
create table taxes_summary as
select Tax_Type, Year, sum(Revenue_Collected_Cr) as Revenue_Collected_Cr
from taxes_sorted
group by Tax_Type, Year;
quit;
proc transpose data=taxes_summary out=taxes_transposed prefix=Year_;
by Tax_Type;
id Year;
var Revenue_Collected_Cr;
run;
proc print data=taxes_transposed;
title "Year-wise Revenue Collection for Each Tax Type (Summarized)";
run;
Output:
Year-wise Revenue Collection for Each Tax Type (Summarized)
Obs | Tax_Type | _NAME_ | Year_2024 | Year_2016 | Year_2015 |
---|---|---|---|---|---|
1 | CGST | Revenue_Collected_Cr | 3200000 | . | . |
2 | Capital_Gains_Tax | Revenue_Collected_Cr | 1000000 | . | . |
3 | Corporate_Tax | Revenue_Collected_Cr | 3300000 | . | . |
4 | Customs_Duty | Revenue_Collected_Cr | 800000 | . | . |
5 | Entertainment_Tax | Revenue_Collected_Cr | . | 75000 | . |
6 | Excise_Duty | Revenue_Collected_Cr | 500000 | . | . |
7 | GST_Compensation_Cess | Revenue_Collected_Cr | 400000 | . | . |
8 | IGST | Revenue_Collected_Cr | 4500000 | . | . |
9 | Income_Tax | Revenue_Collected_Cr | 4200000 | . | . |
10 | Luxury_Tax | Revenue_Collected_Cr | . | 65000 | . |
11 | Professional_Tax | Revenue_Collected_Cr | 80000 | . | . |
12 | Property_Tax | Revenue_Collected_Cr | 120000 | . | . |
13 | Road_Tax | Revenue_Collected_Cr | 175000 | . | . |
14 | SGST | Revenue_Collected_Cr | 4000000 | . | . |
15 | Service_Tax | Revenue_Collected_Cr | . | 1200000 | . |
16 | Stamp_Duty | Revenue_Collected_Cr | 165000 | . | . |
17 | TDS | Revenue_Collected_Cr | 200000 | . | . |
18 | Wealth_Tax | Revenue_Collected_Cr | . | . | 50000 |
STEP 7: SQL QUERIES FOR SPECIFIC ANALYSIS
7.1 Top 5 taxes by revenue
proc sql outobs=5;
create table top5_revenue as
select Tax_Type, sum(Revenue_Collected_Cr) as Total_Revenue
from taxes_india
group by Tax_Type
order by Total_Revenue desc;
quit;
proc print data=top5_revenue;
title "Top 5 Taxes by Total Revenue";
run;
Output:
Top 5 Taxes by Total Revenue
Obs | Tax_Type | Total_Revenue |
---|---|---|
1 | IGST | 4500000 |
2 | Income_Tax | 4200000 |
3 | SGST | 4000000 |
4 | Corporate_Tax | 3300000 |
5 | CGST | 3200000 |
7.2 Average tax rate for each category
proc sql;
select Category, avg(Rate_Percent) as Avg_Rate
from taxes_india
group by Category;
quit;
Output:
Category | Avg_Rate |
---|---|
Direct | 298.6471 |
Indirect | 11.9 |
STEP 8: MACRO FOR AUTOMATED YEAR ANALYSIS
%macro tax_analysis(year);
title "Tax Analysis for Year &year";
proc sql;
select Tax_Type, Category, State, Rate_Percent, Revenue_Collected_Cr
from taxes_india
where Year = &year
order by Revenue_Collected_Cr desc;
quit;
proc means data=taxes_india;
where Year = &year;
var Revenue_Collected_Cr;
title "Summary of Revenue for Year &year";
run;
%mend;
%tax_analysis(2024);
Output:
Tax Analysis for Year 2024
Tax_Type | Category | State | Rate_Percent | Revenue_Collected_Cr |
---|---|---|---|---|
IGST | Indirect | All_India | 18 | 4500000 |
CGST | Indirect | All_India | 9 | 3200000 |
Income_Tax | Direct | All_India | 30 | 2200000 |
SGST | Indirect | Maharashtra | 9 | 2200000 |
Corporate_Tax | Direct | All_India | 30 | 1800000 |
SGST | Indirect | Karnataka | 9 | 1800000 |
Corporate_Tax | Direct | All_India | 25 | 1500000 |
Income_Tax | Direct | All_India | 20 | 1250000 |
Customs_Duty | Indirect | All_India | 10 | 800000 |
Income_Tax | Direct | All_India | 5 | 750000 |
Capital_Gains_Tax | Direct | All_India | 10 | 600000 |
Excise_Duty | Indirect | All_India | 12 | 500000 |
GST_Compensation_Cess | Indirect | All_India | 12 | 400000 |
Capital_Gains_Tax | Direct | All_India | 15 | 400000 |
TDS | Direct | All_India | 10 | 200000 |
Stamp_Duty | Direct | Maharashtra | 5 | 95000 |
Road_Tax | Direct | Telangana | 8 | 90000 |
Road_Tax | Direct | TamilNadu | 10 | 85000 |
Property_Tax | Direct | Mumbai | 1 | 70000 |
Stamp_Duty | Direct | Telangana | 6 | 70000 |
Property_Tax | Direct | Delhi | 1 | 50000 |
Professional_Tax | Direct | Maharashtra | 2500 | 45000 |
Professional_Tax | Direct | Karnataka | 2400 | 35000 |
Summary of Revenue for Year 2024
The MEANS Procedure
Analysis Variable : Revenue_Collected_Cr | ||||
---|---|---|---|---|
N | Mean | Std Dev | Minimum | Maximum |
23 | 984347.83 | 1175300.06 | 35000.00 | 4500000.00 |
%tax_analysis(2016);
Output:
Tax Analysis for Year 2016
Tax_Type | Category | State | Rate_Percent | Revenue_Collected_Cr |
---|---|---|---|---|
Service_Tax | Indirect | All_India | 15 | 1200000 |
Entertainment_Tax | Indirect | Delhi | 15 | 75000 |
Luxury_Tax | Indirect | Goa | 10 | 65000 |
Summary of Revenue for Year 2016
The MEANS Procedure
Analysis Variable : Revenue_Collected_Cr | ||||
---|---|---|---|---|
N | Mean | Std Dev | Minimum | Maximum |
3 | 446666.67 | 652424.96 | 65000.00 | 1200000.00 |
- Get link
- X
- Other Apps
Comments
Post a Comment