Posts

Forecasting with ARIMA: R Code

Step-1:  ###R Packages Installed library(fpp2) library(readxl) library(SPlit) library(fpp2)   ###Declare time-series data ###In this study I have file naming as HPI_AUS. All the date excel format. HPI_AUS <-ts(AUSHPI[,2], start=c(2002,3), frequency=4)   Step-3: ###While forecasting, first that should be done within the sample, and if it is found valid, then only we forrecast out of sample. ###Split the given data into the training and test sets split_HPI_AUS <- ts_split(ts.obj = HPI_AUS, sample.out= 8) training <- split_AUSHPI$train testing <- split_AUSHPI$test length(training) length(testing)  Step-4:###Select the appropriate forecasting tool. Here I have used ARIMA (easy and quick model) ###ARIMA In-sample testing arima_diag(training)     ###Model forecasting In-sample arima1 <- auto.arima(training, seasonal= TRUE) autoplot(arima1) check_res(arima1)   ###Forecasting In-sample fcast1...

Inflation is a Hidden form of Tax in Nepal: A Granger Causality Test

Abstract  Inflation is taken as a secret form of taxing people, thus in literature it is also known as an indirect form of tax. This has been tested by using the secondary data since 1975 to 2010 on government tax revenue (GTAX) and national consumer price index (NCPI) of Nepal. Initially, ADF test, then Granger Causality and finally OLS has been conducted. Granger Causality has suggested that NCPI causes GTAX which helped later to consider NCPI as an independent variable and GTAX as a dependent variable. After conducting OLS test it is found that NCPI impacts GTAX directly (Acharya, 2014).  Key Words : Inflation, Tax, Granger Causality and OLS.  Reference: Acharya, S. (2014). Inflation is a hidden form of tax in Nepal: Granger Causality test. Khwopa Journal , 1 (1), 61–75.

Four Growth Theories

Keynesian Economics

Golden Section Search Method: Fortran f90

Consider the nonlinear equation f(x)=4x 2 –exp(x). Write a Fortran program that uses the Golden Section Search Method to find the solution accurate to within 10 -6 for the nonlinear equation on [4,8].  Sauce Code: Program  Assignmentq2 implicit none real:: f real::x, r, q1, q2,a, b, tol=1.0e-6 !Define Interval and Function f(x) = 4*x**2-exp(x) a=4 b=8 print*, "a", a, "b", b !Evaluation of the function at the end point r=(sqrt(5.0)-1)/2 q1=b-r*(b-a) q2=a+r*(b-a)  print*, "q1",q1, "q2", q2  ! Creating Loop !if ((b-a)<=tol) stop do while ((b-a)>tol)      !if(f(a)*f(b)<=0) then      if(f(a)*f(q2)<=0) then          b=q2          q2=q1          q1=b-r*(b-a)      else          a=q1          q1=q2          q2=a+r*(b-a) ...