Friday, June 18, 2021

Some of the useful codes in R (Applied Econometrics with R)

  ■ Some codes in R


Note: Dep var = Dependent Variable.

           Ind var = Independent Variable.

           Var 1 = Variable 1

           Var 2 = Variable 2

a) Taking log values

lvar1 <- log(var1, base = 10)


b) Correlation Test

#install.packages (corTest)

library (corTest)

cor.test(var1, var2)


c) Unit Roots Test (without deseaonalisation)

# install.packages(fUnitRoots)

library(fUnitRoots)


d) Testing Unit Root at Level (ADF)

adfTest (lvar1, lags = 0, type = "c")


e) Taking 1st difference

d.var1 <-diff (var1)


f) Lag selection criteria

#install.packages (vars)

library (vars)

Say, 

kk <-cbind (lvar1, lvar2, ... lvarn)

VARselect (kk) $selection


g) Co Integration  (Johannessen)

Say,

JC1 <- ca.jo (kk, type = "trace", ecdet = "none", K =3)


h) Eigen Value Stat

JC1 <- ca.jo (kk, type = "eigen", ecdet = "none", k = 3)

i) VECM (in p - 1 lags)

Say, 

model1 = VECM (data.frame (vars), lag = n, r = m, estim = "ML")

where, r = no. of co integrating relationship (will discuss later)


j) Impulse Response Function

plot (irf (model1, n.ahead=10))

for 10 periods.


k) Multicollinearity in R

Packages are - car, faraway, VIF, fmsb, HH.

Say, 

#install.packages (faraway)

library (faraway)

model1 = lm (depvar~ind vars)

faraway : : vif (model1)

The result obtained should be less than 5.


l) Serial Correlation in R

Box.Test (var, lag = n, type = "Ljung-Box")

Box.Test (var, lag = n, type = "Box-Pierce")

Serial correlation if exist we can make the model into GARCH.


m) Heteroscedasticity in R

#install.packages (lmtest)

model1 = lm (var1~ var2)

bp test (model1) Breush Pagan test


n) Normality Test

Shapiro - Wilk test

Say a hypothetical test

c < - LC $ variable [1:n]

shapiro.test (c)

If the result p value is more than .05 then the data is normally distributed.


o) Ramsey Test

#install.packages (lmtest)

library (lmtest)

model1 = lm (var 1 ~ var 2)

resettest (model1)

Let's see the results, Ho: There's linearity in model.

If the p value is more than .05 then our null hypothesis is accepted then linearity in the model.


To be contd...

Aditya Pokhrel 

P.S Comments are lauded



Saturday, June 12, 2021

Stochastic and Deterministic trend using R (Applied Econometrics)

Stochastic and Deterministic trend using R

Let’s say that there are two variables. The share price of Nepal Lever Ltd and there’s a NEPSE index. We will now identify whether the NEPSE index has a stochastic or a deterministic trend.

For this we have to install the packages and import the data as in .csv files (this data import is skipped over here).

For this: tseries would be the package.

Now, in R studio, it is

library(tseries)

attach(NepaLever)

nepse = NepaLever $ NEPSEINDEX

Now it is to be noted that if the time series has trend then its parameters may not be stable and remain same in the future and our forecast may not be correct.

Let’s plot.

plot.ts(nepse)

See the figure. If the trending variable change in an uncertain amount in each period (vt) say, then it is known as the stochastic trend.

Now, let’s see for deterministic trend

Say, there is the data named as “datsalesyear”

Now, In R,

library(tseries)

attach(datsalesyear)

plot.ts(datsalesyear)

After this, view the graph. If the change is constant then there’s a deterministic trend.

SOLUTION: If the series has a deterministic trend the solution is de trending.

         If the series has a stochastic trend the solution is re trending.

Note: More will be discussed on re trending and de trending on upcoming blogs.


Thank You

P.S Comments are lauded.

Aditya Pokhrel

Thursday, June 10, 2021

What does GEPR (June 2021) highlight ? Here you go. (International Economics).

# Global Economic Prospects Report – June, 2021

 

1)      Global Economy is expected to expand by 5.6 % in the year 2021 (this is said to be the fastest post recession expansion in 80 years).

 

2)      The global output is expected to be below 2 % if it is compared with the pre-pandemic projections for the end of the year 2021.

 

3)      The economic growth of the U.S is expected to rise by 6.8 % in the year 2021 (this is due to the easing of the pandemic restrictions and large fiscal support).

 

4)      The economic growth of China is expected to rise by 8.5 % in the year 202 (due to the release of the pent-up demand).

Note: Pent up Demand is the condition where the demand for a product/service is unusually strong.

 

5)      Emerging markets and developing economies are expected to grow at 6 % in a year (due to the higher demand and elevated commodity prices).

 

6)      The economic growth of the East Asia and Pacific is projected to grow by 7.7 % in 2021 (5.3 % in 2022).

 

7)      The economic growth of the Europe and Central Asia is projected to grow by 3.9 % in 2021 (3.9 % in 2022).

 

8)      The economic growth of the Latin America and Caribbean is projected to grow by 5.2 % in 2021 (2.9 % in 2022).

 

9)      The economic growth of the Middle East and North Africa is projected to grow by 2.4 % in 2021 (3.5 % in 2022).

 

10)  The economic growth of the South Asia is projected to grow by 6.8 % in 2021 (6.8 % in 2022).

 

11)  The economic growth of the Sub Saharan Africa is projected to grow by 2.8 % in 2021 (3.3 % in 2022).

 

12)  The Per Capita Income of the many emerging and developing economies is also expected to remain below the pre-pandemic levels and the losses are expected to worsen the deprivations associated with health, education and living standards.

 

13)  The economic growth of the low-income economies in the year 2021 is expected to grow by a 2.9 % (2021) and 4.7 % (2022) (the growth in 2021 is said to be slowest in the past 20 years, partly reflecting the very slow pace of the vaccination).

 

14)  Trade costs will remain almost one-half higher in the emerging markets and developing economies than in the advanced economies, in a large part due to the higher shipping and logistics costs.

 

15)  The higher global inflation may complicate the policy choices of the emerging markets and the developing economies in up coming months as some of these economies still rely upon the expansionary support measures to ensure a durable recovery.

 

16)   The challenges related to the food insecurity in the low-income countries can rise due to the rising food prices and accelerating the aggregate inflation in the year 2021.

 

Thank You

Aditya Pokhrel

Sunday, April 25, 2021

Government's upcoming Budget 78/79, What could be the priorities ? (Nepalese Economics)

 ●How the budget of the 2078/79 ought to be?

It was in 2008 B.S when the then neo Finance minister of Nepal, Shree Subarna Shumser J.B Rana released the first budget of Nepal through parliament. Since then the 69 other proclamations of the budget were done with various revenue and expenditure headings. 

Previous years’ budget (Rs. 1.4764 trillion) concentrated solely on the COVID 19 control and its safety measures and the MoF allocated Rs. 90.69 Arab to the health sector where out of it Rs. 12.46 Arab was allocated for the health infrastructures and Rs. 6 Arab allocated to disburse the COVID 19 related tools.

Aspects to be concentrated to formulate a budget.

Nepal faces a difficulty in the effective utilization of the budget in the prioritized areas. The quandaries remain still in the three questions:

What are the major priorities of the coming FY year’s budget?

How to effectively implement (perfectly put into practice - optimally utilize) the budgeted amount into those specified sectors?

Does just raising the ceiling of the budget is going to work out?

The National Planning Commission (NPC) has already set guidelines on the budget formulation and structure to the specific ministries and agencies estimating the budget and it has strictly directed that the budget ought to address the impact of the COVID 19. NPC is about to set Rs. 17 Kharab as the ceiling of the budget which I think is too high. 

We’ve been facing the problem of implementation of the budget since many years and rapid construction tasks by the ministry is especially seen during the month of Baisakh and Jestha. This culture stumbles to only one reason which is just to end up with utilizing the budget but at the eleventh hour.

As we know that our budgetary goals must coincide with the goals of the 15th periodic plan, Long term Sustainable Development Goals (2100 B.S), Aggregate Economic Framework of our country, the National pride projects (to be under a specific budget limit) and other COVID 19’s prioritized setups, the budget 2078/79 hence ought to be rational and not ambitious one.

How’s our current economic situation?

We are still beaten up by the impact of the COVID 19 and still to be beaten up more by the second wave which is anytime to efflux over us.  We have an economic growth of 1.88 (negative) percent this year, 18.68 per cent of the people still live below poverty line (NPC), the Per capita income entails to be $ 1130 this year, the GDP of the previous year reached Rs. 39.44 Kharab.

In addition to these, we are in the trade balance deficit of around Rs. 800 Arabs. The Foreign Reserves that we have with the central bank (NRB) can withstand the purchase of the g/s for up to 13.8 months. The remittance inflow income has increased around to Rs. 5 Kharab and this is an increase of nearly an 11 per cent if we compare to the previous year’s inflow.

In addition to these, as per the United Nation’s Development Policy, Nepal was lifted from the Least Developed countries list to the Low Middle Income countries’ lists (when Nepal’s PCI was above $1040 past year).

Priorities of the Budget

It’s evident that due to the poor homework before prioritizing the areas for budget allocation by various ministries and departments, the budget implementation process is not seen that much effective in Nepal. We have tendency to decrease or increase in the amounts in previous years budget and release the new one.

So, because of this, before prioritizing the new budget we have to assess the implementation of the previous years budget and analyze its implementation on a specific time basis. To elaborate it, we have to identify and properly assess that how much expenditure is made during the quarters within a particular FY and that also too in respective sectors.

We must know, inspect and assess that why there was the problem in the implementation of the budget? What we ought not to do to repeat the similar stipulations as before? For this, we must see the technicalities, technicalities as such that, what does the FCGO suggest about the budget accounting? Where were the slacks? Can those slacks be technically identified, econometrically justified or maybe qualitatively signified and any control mechanisms could be fostered? Many questions like these being the crucial ones, are to be addressed.

Its’s vivid enough that, this year’s budget ought to primarily focus on the impact of the COVID 19, rapid development and efficient production of the hydro energy. Besides these the major priorities could be:


Agricultural sector

Nepalese agriculture encompasses a one third portion when it comes to the contribution to our GDP. Despite this, we still are not being able to export our agricultural products. The Macroeconomic indicators (NRB) reveals the highest that we import is the “Rice” and after that there is the Petroleum products standing. According to the Survey report of the Department of the Agriculture, only 21 per cent out of the total agricultural land is fit for irrigation. There is the problem of the crop plantation because the new imported seeds are not technically viable for our soil. 

This FY as stated earlier, we imported around Rs. 47.86 Arabs of food items from across the borders (especially India). The politicization in the manure import and the consequence of the manure shortage, is another addition to the agricultural quandary.

The agricultural research is also not profuse in Nepal. Barren lands are there, as they were since decades. Local farming still remains just to sustain and has not been able to become a healthy profession for youngsters. Government should not only provide concessional agricultural loans to the farmers but also it should ensure that which group of community or farmers are receiving and benefitting from it.

The farmers that live under poverty line should be completely subsidized by the government when it comes to granting the seeds, manure and other technical agricultural equipment. Proper management of the logistics and supply system and warehouses should be set up. The cattle quarantine facility should be fostered even more. 

It was stated in the previous years budget that sugarcane farmers would be allotted a Rs. 95 crore amounts, but still they have not received the payment of it yet. This also should be properly addressed in this years’ budget.

In addition, as the agriculture is still the prime sector, the new insights in it, such as Agri Ambulance, Agri Hybrid Techs (seeds development and engineering), Agri warehousing, and rapid commercializing the agriculture should be fostered even more. 


Industrial Sector

One of the deeply stricken areas by the impact of the previous year’s COVID 19 is Industrial Sector. After COVID 19, these days, almost 90 per cent of the Industries have already re-started. But as we know that the second wave of the COVID 19’s bell has already rung, with this, this sector is seen to deteriorate even further. The production of the industrial sector has almost reduced to 50 per cent according to the Department of the Industry (DOI). Hotels, Restaurants, Handicrafts, Readymade garments, Consultancy services are some of the deeply affected areas.

This sector also lacks the raw materials and sufficient laborers. There is the lack of the adequate capital in the small, cottage and small enterprises. For this the government should state the budget to preserve Nepali Industries and ought to devise a proper long term and short-term plans to uplift these sectors. Tax rebates, refinancing facilities, concessional loans, VAT refunds should be fostered.


Employment opportunities

Many of the Nepalese have returned back to Nepal since the hit of the pandemic. For them, the government should be active to provide the employment in the agricultural industry, small and medium enterprises and cottage industry sector. The employments such as in the Barber shops, Vegetables and Fruit shop market, ragmen ought to encompass the people from only our country.


Educational Sector

The competent Human resource for a country is only determined by the efficient education system in the country. The qualitative, competitive and modern education system should be fostered. The skill and practice-oriented learning and teaching pedagogy should be focused through the budget specifications. Education sector should be made more happening so that it can halt the students to fly abroad and those who dream about foreign education since their childhood. The policy ought to be drafted and the budget should be allotted such that the Education would have a perfect correlation with the Employment creation.

Health Sector

As the second wave of the COVID 19 is roaring loudly, the budget priority also should be in this sector this year as well. The budget should be set to encompass more beds for patients in the hospitals, hospital system should be quick and modern, the infrastructure in it should be ready and happening 24/7. The provision of the Highway hospital construction, one doctor and one nurse in an Ambulance, etc should be focused.


Private Sectors

The private sector too remains dominant this year to uplift the economic situation that had been deeply stricken by the COVID 19 in the previous year. Here government should focus to allocate budget and it should not only simply raise the Rate of the Tax but also Increase the basis of Taxation. This ensures a stable tax elasticity [(dT/T)÷(dY/Y)] as well.


Financial and Cooperative Sector

When it comes to the Financial Sector the NRB would be exercising its monetary roles after the budget is once proclaimed. Despite, the special convenience loans that was to be restructured having the broader interest rate should be continued. The Interest, Loan and Insurance subsidy should be looked once and budget should be allotted in accordance with the activity assessment.

The digitization, QR modes of payment mechanisms, etc should be looked by the central bank and in addition to this, the cooperative sector should be made cashless. Sana Kisan Bikas Bank should be provided with more incentives.


Moreover, overlooking all this, the ‘Expenditure Reduction’ of the government should also be done in order to make the budget more implicative. The unnecessary procurements by the governments ought to be stopped, the unnecessary meetings allowances (to the ministers or high posted government officials) should be lessened out, allowances should be there to the highly prioritized areas. The number of unnecessary ministries, departments in the government offices should be cut off and streamlined.

In nutshell, the coming budget ought to be export oriented and should be optimally and rationally justifying the above stated prioritized areas. 

Sources: NPC, MoF, Dr. D.N Dangal sir's suggestions. NRB Periodic Review.

Thank You

P.S Comments are Lauded          Aditya Pokhrel, Asst. Director (NRB)

MBA, MA Eco, MPA(prsng)



 


Friday, April 23, 2021

How was FDI in 2019/20? - Analysis on Report by NRB-ERD (International Economics)

● Brief Analysis on “A survey report of FDI in Nepal in the FY 2019/20: NRB– April 2021” In accordance with the UNCTAD’s report 2021.

Trend of FDI Inflows (World)

FDI inflows of Developed Economies = Increased by 5.1 % (2019) because according to the UNCTAD report the main reason for this is due to the cross border transactions, merger and acquisitions and dividend repatriation by the developed economies.

FDI inflows of Developing Economies = Decreased by 2.1 % (2019). Though the FDI inflows in the developing countries had increased earlier in the year 2018 (8.1 %, UNCTAD report), this time because the developed economies had taken away the cake, the FDI decreased. 

Asia remained the largest FDI recipient region: 30.8 % out of global inflows because India being the main and dominant recipient of the FDI in Asia, the number is counted on high.

FDI inflows in Asia decreased from USD 498.56 to 473.90 billion in 2019 because according to the World Investment Report the FDI inflows to Hong Kong has fallen sharply as compared to the increment in 2018.

FDI inflows in South Asia increased by 10 % to USD 57.43 billion in 2019 because India’s FDI has increased (USD 51 billion) and it ranked World’s 9th ranked FDI (UNCTAD report).


Trend of FDI Flows (Nepal)

Gross FDI inflows increased by 18.2 % to Rs. 19.68 billion in 2019/20 because of the various development projects that has started by foreign countries, especially China.

Repatriation of foreign investment during 2019/20 remained at Rs. 199.8 million (1% of Gross FDI Flows).

Actual FDI inflow stood around 34.1 % of total FDI approval in Nepal.


International Investment Position of Nepal

Net International Investment Position (IIP) = 188,856.4 (Rs. Million) [in 2018 it was 282,123.9]


Province wise FDI stock’s share

Province 1 = 7.8 %

Province 2 = 9.9 %

Bagmati = 65.5 % (Largest because Bagmati province is the most developed state in Nepal and Kathmandu being the capital maximum FDI’s entail through this).

Gandaki = 14.2 %

Lumbini = 1.9 %

Karnali = 0.7 %

Sudur Paschim = 0 % (Least because due to the lack of proper research on the prospects of the FDI over here, no any Foreign Investors seek to approach here, and government is also naive to launch any specific projects – nation pride’s one over here recently).


FDI inflows by major sectors in Nepal

The following sectors attracted the most FDI in 2019/20.

Electricity, Gas and Water = 16072.6 (Rs. Million). This has highest share (81.7%) because there is a huge investment in hydropower in Nepal, Bio Gas in Terai and Drinking Water projects.

Analysis: We should not be so happy by this highest share because this sector has been dominant to have taken largest share because this has not come out of profuse research. We have fallen back to research other probable sectors where the FDI can be oriented.


Transport, Storage and Communication = 1368.2 (Rs. Million). This has the lowest Share (7%) because this sector in my opinion is already saturated sectors of Nepal. However, Transportation and Storage system should be highly prioritized.


Dividend Repatriation = The approval amount equivalent to Rs. 12.90 billion of dividend repatriation by the foreign investment companies was provided in the FY 2019/20.


Dividend Repatriation approval of the Industrial Sector in the FY 2019/20 was the highest. Let’s see below:


Industrial Sector – 7527.1 (Rs Million)

Hydro energy Sector – 32.3 (Rs. Million)

Financial Sector – 4799.6 (Rs. Million)

Communication Sector – 0 (Rs. Million)

Other Service Sector – 544.1 (Rs. Million)




FDI stock in Nepal


S.N

Particulars

FY 2019/20

Percentage Change


1.

Paid Up Capital

88158.3

14.7%


2.

Reserves

78381.9

-27%


3.

Loans

16379.4

0.5%



Total FDI stock

182919.6

-8.8 %



In the year 2019 the reserves, paid up capital and loans amounted to 53.6 %, 38.3 % and 8.1 % of the total FDI stock respectively.


FDI stock by Sectors

The manufacturing, mining and quarrying has the highest FDI stock of Rs. 52.24 (Billion).

Similarly, the Financial Intermediation has the share of Rs. 50.10 (Billion) and Electricity, Gas and Water have Rs. 36.66 (Billion).

FDI stock by countries

India has the highest share (30.6 %) and then comes the China (15.1%), both being the neighboring countries of Nepal and then Saint Kitts and Nevis (13.6 %). 

Thus, this how FDI has been inflowing to Nepal.

Thank you

Aditya Pokhrel, Asst Director (NRB)

MBA, MA Economics, MPA(prsng)


Regression Discontinuity - How to determine whether it is Sharp or Fuzzy RD ? Simplest Look.           Regression discontinuity design is ga...