marginal propensity to consume in usa web viewmarginal propensity to consume in usa. ... the...

38
Marginal Propensity to Consume in USA Francisco Javier Parra Rodríguez Universidad de Cantabria (UNICAN), España [email protected] Abstract The objective is estimate a marginal propensity to consume ( MPC) for the American economy through a classic Keynesian consumption function with microdata from household surveys . The MPC value are influenced by alternative definitions of spending units or consumption expenditure and income, at real or a per capita level, usually the data are grouped by arbitrary but seemingly reasonable income intervals. The form to data are collected to describe expenditure patterns, organized by income interval, and highly aggregated, determine the different MPC in consumption function. We propose an estimation method that uses income percentiles to grouping survey sample. These estimates usually have normal problems in error term due to outlier, dependence, heteroscedasticity or the existence of nonlinear relationships in the variables. By Regression Band Spectrum (RBS) , and Generalized Linear Models (GLM), we can solve this problems. Classification JEL (Journal of Economic Literature): E12, E21,R21 The consumption functions The consumption functions show the relationship between real disposable income and consumer spending: C i =a+bY i +e i (1) Where, C i is the household i Consumer spending, Y i , the household i income, and e i is a vector of disturbance terms each with zero mean and constant variance, σ 2 .

Upload: vukhue

Post on 31-Jan-2018

246 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

Marginal Propensity to Consume in USAFrancisco Javier Parra Rodríguez

Universidad de Cantabria (UNICAN), España

[email protected]

Abstract

The objective is estimate a marginal propensity to consume ( MPC) for the American economy through a classic Keynesian consumption function with microdata from household surveys . The MPC value are influenced by alternative definitions of spending units or consumption expenditure and income, at real or a per capita level, usually the data are grouped by arbitrary but seemingly reasonable income intervals. The form to data are collected to describe expenditure patterns, organized by income interval, and highly aggregated, determine the different MPC in consumption function. We propose an estimation method that uses income percentiles to grouping survey sample. These estimates usually have normal problems in error term due to outlier, dependence, heteroscedasticity or the existence of nonlinear relationships in the variables. By Regression Band Spectrum (RBS) , and Generalized Linear Models (GLM), we can solve this problems.

Classification JEL (Journal of Economic Literature): E12, E21,R21

The consumption functions

The consumption functions show the relationship between real disposable income and consumer spending:

C i=a+bY i+ei (1)

Where, C i is the household i Consumer spending, Y i , the household i income, and e i is a vector of disturbance terms each with zero mean and constant variance, σ 2.

The ratio of total consumption to total income, ∑Ci

∑Y i, is known as the average propensity to

consume; the ratio of consumption changes to income changes,b, is MPC, and, a, the autonomous consumption, or the level of consumption that would still exist even if household income was 0.

To time t , the total consumer expenditure in an area is:

C t=∑❑

¿∑❑

at+btY i+e i¿=nt at+b t∑❑

❑¿ (2)

Page 2: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

Where, nt are the total household at time t in this area, if e i is a disturbance term with zero

mean then: ∑❑

¿0.

Now,Y t and nt are not fixed variables, and assuming some random variability in a t and b t around the expected value :a and b, (2) could be express:

C t=ant+bY t+ut, t=1 , .. . , T (3)

Where ut is a vector of disturbance terms each with zero mean and constant variance, σ 2.

Dividing (3) to nt , the formulation to consumption functions in Keynes is obtained :

c t=a+b y t+ut(4)

Where c t is the Consumer spending per capita in time t , y t is the income per capita in t time.

The Keynes consumption theory, was soon questioned both its theoretical simplicity as by empirical evidence. Kutnets, Feber, Goldsmith and others of a time series or long-run estimated PMC around 0.90 in USA. On the other hand, studies utilizing expenditure survey data found cross-sectional or household MPC's mostly in the range of 0.60 to 0.80. These empirical differences, originated the consumption function paradox, or that somehow individual or household behaviour was different than aggregate behaviour, it implied that The Keynes consumption theory was incomplete , possibly even incorrect. The paradox, stimulated efforts to devise a more complete theory of consumption, the best known are Dusenberry's (1949), Friedman's (1957) permanent income hypothesis, and Modigliani and Brumberg's (1945) life-cycle hypothesis.

According to Friedman's "permanent income hypothesis," the consumption of a household is proportional to its permanent income, that is, the average income it expects to earn over its planning horizon. Friedman is not definite about either the factor of proportionality-which might vary with the household's stage in the life cycle, its wealth, the interest rate, and other variables-or about the length of the planning horizon. On these matters the lifetime income hypothesis of Modigliani is much more explicit. In any case, Friedman employs his hypothesis to explain both the evidence of cross-section budget surveys and the ratchet effect observed in aggregate time series.

Both Modigliani and Brumberg and Friedman used the income elasticity of consumption,

defined at the mean as: : N c y=CY .

to indicate the existence of transitory income. According to Modigliani and Brumberg (1954) when expected equaled actual income for every household, "the elasticity of consumption with respect to income is unity." However, "in the presence of short-term fluctuations in income, the proportion of income consumed will tend to fall with income and the elasticity of consumption with respect to income will be less than one." In Friedman (1957), the elasticity of consumption with respect to income "measures the fraction of the variance of measured income attributable to variation in the permanent component: the higher the elasticity, the smaller the importance of transitory factors

Page 3: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

relative to permanent factors" and that when the income elasticity equals one, "transitory components are all zero."

Bunting, D (2003) think that the assumption that all consumer units have identical permanent incomes is implausible. Repeated Consumer Expenditure Surveys conducted by the Bureau of Labor Statistics have shown that individual incomes differ on the basis of individual human capital qualities, demographic characteristics such as age, sex and race, and wealth . If random or transitory influences actually determine the range of cross sectional incomes, then the income and the educational or demographic characteristics of households should not be correlated.

On the other hand, the MPC's in consumption functions are influenced by alternative definitions of spending units or consumption expenditure, at real or a per capita level (Bunting, 1989), usually the data were grouped by arbitrary but seemingly reasonable income intervals. To show "typical" behaviour, average income and average consumption were calculated by dividing each group by its number of households. The form to data are collected to describe expenditure patterns, organized by income interval, and highly aggregated, determine the different MPC in consumption function.

In Bounting (1989) the estimate of consumption functions to cross section data of BLS to 1960 by income level, such as "under $1000", "$1000 to $2000", "$2000 to $3000", and so on, produces a classic "paradoxical" cross-sectional consumption: the PPC (0.78) is lower than that for the long run. But the percentage distribution of households clearly shows that some intervals represent far more households than others, the income interval used is not a linear transformation of ungrouped data. If corrected the problem of unequal group size using a weighted regression, or exclude the lowest and highest income groups, for example were estimated MPC upcoming to N y c: 0.83 and 0.80, respectively.

We can formulate the consumption function in household by:

C i=biY i (5)

Were C i is the Consumer spending in i household,and Y i is the income in i household..

Grouped the household by income intervals, the consumption expenditure of each group are:

∑i=1

m

¿∑i=1

m

Y i (6)

Where m are the household include in the group.

Dividing (6) by household number and thinking that all household of group are identical

behaviour in MPC, b j=

∑i=1

m

❑, so:

c j=b j y j+e j (7)

Page 4: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

were c j and y j are the consumer spending and income per cápita of each group, and e j was

the difference to use b j in place of the average propensity to consume in the group j , CY .

SA criterium to grouped the household whit identical household in each group are the percentile of income:

c j=a+b j y j+e j(8)

Where e j are a random error term with zero mean, constant variance, σ 2,and independent (c ov (e j ,es)=0).

In that case,b1, b2,...,b100 are the MPC to household of class 1, class 2 ..... , and we expect null difference into MPC and elasticity consumption within class .

Estimation methodology

The function (5) define a no linear relationship into consumer and income household. We assume that b i oscillates randomly around this center of gravity, (5) is specified as (1), a lineal relationship, and we can be use Ordinary Least Squares (OLS). However, it seems reasonable to think that b i change depending on household social class. In this case, the relationship into consumer and income household oscillates around this center of gravity with cyclical patterns, periodic and no-periodic . The equation (5) could be estimated by Generalized Linear Model, or no parametric techniques: kernel or spline. The relationship (8) could be estimated using dummys for group (D j),would be specified:

c i=a+b1Y iD j+ϵ i (9)

Another form to be a relationship into consumer and income household, discriminating by social group, are by a Fourier development:

c j=a+b y j+∑s=1

S

as cos(ωs)+b jsin (ωs)+υ j (10)

were, S=50, ωs=2 πjS ,and υ j a random variable with zero mean, constant variance, σ 2, and

independent (c ov (e j ,es)=0).

The function (10) contain cycles of different frequencies and amplitudes and such combinations of frequencies and amplitudes may yield cyclical patterns which appear non-periodic with irregular amplitude. Given the error term uncorrelated, the more frequent cyclical variations on the tendency line are the differences in PMC between close social groups, and the least frequent cyclical variations on the tendency line are the differences in PMC between distant groups.

To estimate (10) is presented below a series of functions based R (Parra, 2015), the target is make a regression band spectrum (RBS) (Engle, 1974), using the Durbin test (Durbin, 1969) to select the oscillations band.

Page 5: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

Test based on residuals from frequency domain regresion

Durbin (1967 and 1969) desing a technique for studying the general nature of the serial dependence in a satacionary time series.

Suppose β is an estimator of β . The n x 1 vector of residuals is then defined by

u= y− X β

p j denotes the ordinate of the periodogram de u at frequency λ j=2 π j /n, and v j denote the j −t h element of v, then

p j=v2 j2 + v2 j+1

2

j=1 ,. . . n2−1 to n even, and j=1 ,. . .

n−12 to n odd,

p j=v2 j2

j=n2−1 n even

p0= v12

As regards test statistics, if β is the OLS estimator of β then the elements of v may be used directly in Durbin's cumulative periodogram test. This test is based on the quantities

s j=∑r=1

j

where m=12n for n even and

12(n−1) for n odd. The procedure is a bounds test and upper

and lower critical values may be constructed using the tables provided in Durbin (1969). Note that po does not enter into the test statistic as po does not enter in to test statitstic as po=v1=0.

X0.1 <- c(0.4 ,0.35044 ,0.35477 ,0.33435 ,0.31556 ,0.30244 ,0.28991 ,0.27828 ,0.26794 ,0.25884 ,0.25071 ,0.24325 ,0.23639 ,0.2301 ,0.2243 ,0.21895 ,0.21397 ,0.20933 ,0.20498 ,0.20089 ,0.19705 ,0.19343 ,0.19001 ,0.18677 ,0.1837 ,0.18077 ,0.17799 ,0.17037 ,0.1728 ,0.17037 ,0.16805 ,0.16582 ,0.16368 ,0.16162 ,0.15964 ,0.15774 ,0.1559 ,0.15413 ,0.15242 ,0.15076 ,0.14916 ,0.14761 ,0.14011 ,0.14466 ,0.14325 ,0.14188 ,0.14055 ,0.13926 ,0.138 ,0.13678 ,0.13559 ,0.13443 ,0.133 ,0.13221 ,0.13113 ,0.13009 ,0.12907 ,0.12807 ,0.1271 ,0.12615 ,0.12615 ,0.12431 ,0.12431 ,0.12255 ,0.12255 ,0.12087 ,0.12087 ,0.11926 ,0.11926 ,0.11771 ,0.11771 ,0.11622 ,0.11622 ,0.11479 ,0.11479 ,0.11341 ,0.11341 ,0.11208 ,0.11208

Page 6: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

,0.11079 ,0.11079 ,0.10955 ,0.10955 ,0.10835 ,0.10835 ,0.10719 ,0.10719 ,0.10607 ,0.10607 ,0.10499 ,0.10499 ,0.10393 ,0.10393 ,0.10291 ,0.10291 ,0.10192 ,0.10192 ,0.10096 ,0.10096 ,0.10002)

X0.05 <- c(0.45,0.44306,0.41811,0.39075 ,0.37359 ,0.35522 ,0.33905 ,0.32538 ,0.31325 ,0.30221 ,0.29227 ,0.2833 ,0.27515 ,0.26767 ,0.26077 ,0.25439 ,0.24847 ,0.24296 ,0.23781 ,0.23298 ,0.22844 ,0.22416 ,0.22012 ,0.2163 ,0.21268 ,0.20924 ,0.20596 ,0.20283 ,0.19985 ,0.197 ,0.19427 ,0.19166 ,0.18915 ,0.18674 ,0.18442 ,0.18218 ,0.18003 ,0.17796 ,0.17595 ,0.17402 ,0.17215 ,0.17034 ,0.16858 ,0.16688 ,0.16524 ,0.16364 ,0.16208 ,0.16058 ,0.15911 ,0.15769 ,0.1563 ,0.15495 ,0.15363 ,0.15235 ,0.1511 ,0.14989 ,0.1487 ,0.14754 ,0.14641 ,0.1453 ,0.1453 ,0.14361 ,0.14361 ,0.14112 ,0.14112 ,0.13916 ,0.13916 ,0.13728 ,0.13728 ,0.13548 ,0.13548 ,0.13375 ,0.13375 ,0.13208 ,0.13208 ,0.13048 ,0.13048 ,0.12894 ,0.12894 ,0.12745 ,0.12745 ,0.12601 ,0.12601 ,0.12464 ,0.12464 ,0.12327 ,0.12327 ,0.12197 ,0.12197 ,0.12071 ,0.12071 ,0.11949 ,0.11949 ,0.11831 ,0.11831 ,0.11716 ,0.11716 ,0.11604 ,0.11604 ,0.11496)

X0.025 <- c(0.475 ,0.50855 ,0.46702 ,0.44641 ,0.42174 ,0.40045 ,0.38294 ,0.3697 ,0.35277 ,0.34022 ,0.32894 ,0.31869 ,0.30935 ,0.30081 ,0.29296 ,0.2857 ,0.27897 ,0.2727 ,0.26685 ,0.26137 ,0.25622 ,0.25136 ,0.24679 ,0.24245 ,0.23835 ,0.23445 ,0.23074 ,0.22721 ,0.22383 ,0.22061 ,0.21752 ,0.21457 ,0.21173 ,0.20901 ,0.20639 ,0.20337 ,0.20144 ,0.1991 ,0.19684 ,0.19465 ,0.19254 ,0.1905 ,0.18852 ,0.18661 ,0.18475 ,0.18205 ,0.1812 ,0.1795 ,0.17785 ,0.17624 ,0.17468 ,0.17361 ,0.17168 ,0.17024 ,0.16884 ,0.16748 ,0.16613 ,0.16482 ,0.16355 ,0.1623 ,0.1623 ,0.1599 ,0.1599 ,0.1576 ,0.1576 ,0.1554 ,0.1554 ,0.15329 ,0.15329 ,0.15127 ,0.15127 ,0.14932 ,0.14932 ,0.14745 ,0.14745 ,0.14565 ,0.14565 ,0.14392 ,0.14392 ,0.14224 ,0.14224 ,0.14063 ,0.14063 ,0.13907 ,0.13907 ,0.13756 ,0.13756 ,0.1361 ,0.1361 ,0.13468 ,0.13468 ,0.13331 ,0.13331 ,0.13198 ,0.13198 ,0.1307 ,0.1307 ,0.12944 ,0.12944 ,0.12823)

X0.01 <- c( 0.49 ,0.56667 ,0.53456 ,0.50495 ,0.47629 ,0.4544 ,0.43337 ,0.41522 ,0.39922 ,0.38481 ,0.37187 ,0.36019 ,0.34954 ,0.3398 ,0.33083 ,0.32256 ,0.31489 ,0.30775 ,0.30108 ,0.29484 ,0.28898 ,0.28346 ,0.27825 ,0.27333 ,0.26866 ,0.26423 ,0.26001 ,0.256 ,0.25217 ,0.24851 ,0.2450

Page 7: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

1 ,0.24165 ,0.23843 ,0.23534 ,0.23237 ,0.22951 ,0.22676 ,0.2241 ,0.22154 ,0.21906 ,0.21667 ,0.21436 ,0.21212 ,0.20995 ,0.20785 ,0.20581 ,0.20383 ,0.2119 ,0.20003 ,0.19822 ,0.19645 ,0.19473 ,0.19305 ,0.19142 ,0.18983 ,0.18828 ,0.18677 ,0.18529 ,0.18385 ,0.18245 ,0.18245 ,0.17973 ,0.17973 ,0.17713 ,0.17713 ,0.17464 ,0.17464 ,0.17226 ,0.17226 ,0.16997 ,0.16997 ,0.16777 ,0.16777 ,0.16566 ,0.16566 ,0.16363 ,0.16363 ,0.16167 ,0.16167 ,0.15978 ,0.15978 ,0.15795 ,0.15795 ,0.15619 ,0.15619 ,0.15449 ,0.15449 ,0.15284 ,0.15284 ,0.15124 ,0.15124 ,0.1497 ,0.1497 ,0.1482 ,0.1482 ,0.14674 ,0.14674 ,0.14533 ,0.14533 ,0.14396)

X0.005 <- c(0.495 ,0.59596 ,0.579 ,0.5421 ,0.51576 ,0.48988 ,0.4671 ,0.44819 ,0.43071 ,0.41517 ,0.40122 ,0.38856 ,0.37703 ,0.36649 ,0.35679 ,0.34784 ,0.33953 ,0.33181 ,0.32459 ,0.31784 ,0.31149 ,0.30552 ,0.29989 ,0.29456 ,0.28951 ,0.28472 ,0.28016 ,0.27582 ,0.27168 ,0.26772 ,0.26393 ,0.2603 ,0.25348 ,0.25348 ,0.25027 ,0.24718 ,0.24421 ,0.24134 ,0.23857 ,0.23589 ,0.2331 ,0.23081 ,0.22839 ,0.22605 ,0.22377 ,0.22377 ,0.21943 ,0.21753 ,0.21534 ,0.21337 ,0.21146 ,0.20961 ,0.2078 ,0.20604 ,0.20432 ,0.20265 ,0.20101 ,0.19942 ,0.19786 ,0.19635 ,0.19635 ,0.19341 ,0.19341 ,0.19061 ,0.19061 ,0.18792 ,0.18792 ,0.18534 ,0.18534 ,0.18288 ,0.18288 ,0.18051 ,0.18051 ,0.17823 ,0.17823 ,0.17188 ,0.17188 ,0.17392 ,0.17392 ,0.17188 ,0.17188 ,0.16992 ,0.16992 ,0.16802 ,0.16802 ,0.16618 ,0.16618 ,0.1644 ,0.1644 ,0.16268 ,0.16268 ,0.16101 ,0.16101 ,0.1594 ,0.1594 ,0.15783 ,0.15783 ,0.15631 ,0.15631 ,0.15483)

TestD <- data.frame(X0.1,X0.05,X0.025,X0.01,X0.005)

Fuction td (a,b)

Calculates and shows the results of testing Durbin (Durbin, 1969), applied to the variable a and the significance level b to b=0.1(significance=1); b=0.05 (significance=2); b=0.025 (significance=3); b=0.01 (significance=4) and b=0.005 (significance=5) (Durbin; 1969)

td <- function(y,significance) {# Author: Francisco Parra Rodríguez# Some ideas from:#Harvey, A.C. (1978), Linear Regression in the Frequency Domain, International Economic Review, 19, 507-512.# DURBIN, J., "Tests for Serial Correlation in Regression Analysis based on the Periodogram ofLeast-Squares Residuals," Biometrika, 56, (No. 1, 1969), 1-15.# http://econometria.wordpress.com/2013/08/21/estimation-of-time-varying-regression-coefficients/

Page 8: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

per <- periodograma(y)p <- as.numeric(per$densidad)n <- length(p)s <- p[1]t <- 1:nfor(i in 2:n) {s1 <-p[i]+s[(i-1)]s <- c(s,s1)s2 <- s/s[n]}while (n > 100) n <- 100if (significance==1) c<- c(TestD[n,1]) else {if (significance==2) c <- c(TestD[n,2]) else {if (significance==3) c <- c(TestD[n,3]) else {if (significance==4) c <- c(TestD[n,4]) c <- c(TestD[n,5])}}}min <- -c+(t/length(p))max <- c+(t/length(p))data.frame(s2,min,max)}

c) Fuction gtd (a,b)

Plot to the Durbin test (Durbin, 1969), applied to the variable a and the significance level b.

gtd <- function (y,significance) {S <- td(y,significance)plot(ts(S), plot.type="single", lty=1:3,main = "Test Durbin", ylab = "densidad acumulada",xlab="frecuencia")}

Alternatively you can use the cpgram function from MASS package (src/library/stats/R/cpgram.R).

d) Function rdf (y,x, significance)

Consider now the linear regression model

$$\begin{equation} y_t=\beta_tx_t+u_t \end{equation}$$

where x t is an n x 1 vector of fixed observations on the independent variable, β t is a n x 1 vector of parameters,y is an n x 1 vector of observations on the dependent variable, and ut is an n x 1 vector de errores distribuidos con media cero y varianza constante.

Whit the assumption that any series, y t,x t,β t and u t , can be transformed into a set of sine and cosine waves such as:

y t=ηy+∑j=1

N

a jy cos(ω j)+b j

y sin(ω j)

x t=ηx+∑j=1

N

a jy cos(ω j)+b j

ysin(ω j)¿¿

Page 9: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

β t=ηβ+∑j=1

N

a jβ cos (ω j)+b j

β sin (ω j)¿¿

Pre-multiplying (6) by Z:

y= x β+ u

donde y=Z y,$ x = Zx$, $ = Z$ y $ u = Zu$

The system (8) can be rewritten as (see appendix):

y=Z x t I nZT β+Z InZ

T u

If we call e=Z I nZT u, It can be found the β that minimize the sum of squared errors

ET=ZT e.

Once you have found the solution to this optimization, the series would be transformed into the time domain for the system (8).

In the function , y is the dependent variable, x is the independent variables,and s i gn i f i c anc e the significance for the Durbin test.

The algorithm calculation is performed in phases:

a) Gets the cross-periodogram to x and y .

Let x a vector n x 1, in frequency domain x=W x

Let ya vector n x 1, in frequency domain y=W y

p j denotes the ordinate of the cross-periodogram to x and y at frequency λ j=2 π j /n, and x j the j-th element to x and y j the j-th element to y , then

{p j= x2 j y2 j+ x2 j+1 y2 j+1 ∀ j=1 , . .. n−12

p j= x2 j y2 j ∀ j=n2−1

p0= x1 y1

b) Order the co - spectrum by the absolute value of p j and make a index.

c) Calculate the matrix W x t InWT , the matrix rows are ordered by index.

d) Calculate e=W I nWT u, add a vector by constant term, ¿, then calculate the model by

constant term and the de two first regressors to ordered matrix W x t InWT , cthen

calculate the model by the constant and the de fourt first regressors, then for six, to complete the n regressors to ordered matrix.

e) Testing for serial correlation all model to α=0.1 ;0.05 ;0.025 ;0.01; 0.005.

Page 10: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

f) Select the lowest degree of freedom models with random term uncorrelated. If any is uncorrelated returns the OLS.

rdf <- function (y,x,significance) { # Author: Francisco Parra Rodríguez # http://rpubs.com/PacoParra/24432 # Leemos datos en forma matriz a <- matrix(y, nrow=1) b <- matrix(x, nrow=1) n <- length(a) # calculamos el cros espectro mediante la funcion cperiodograma cperiodograma <- function(y,x) {# Author: Francisco Parra Rodríguez# http://econometria.wordpress.com/2013/08/21/estimation-of-time-varying-regression-coefficients/ cfx <- gdf(y)n <- length(y)cfy <- gdf(x)if (n%%2==0) {m1x <- c(0)m2x <- c()for(i in 1:n){if(i%%2==0) m1x <-c(m1x,cfx[i]) else m2x <-c(m2x,cfx[i])}m2x <- c(m2x,0)m1y <- c(0)m2y <- c()for(i in 1:n){if(i%%2==0) m1y <-c(m1y,cfy[i]) else m2y <-c(m2y,cfy[i])}m2y <-c(m2y,0) frecuencia <- seq(0:(n/2)) frecuencia <- frecuencia-1omega <- pi*frecuencia/(n/2)periodos <- n/frecuenciadensidad <- (m1x*m1y+m2x*m2y)/(4*pi)tabla <- data.frame(omega,frecuencia, periodos,densidad)tabla$densidad[(n/2+1)] <- 4*tabla$densidad[(n/2+1)]data.frame(tabla[2:(n/2+1),])}else {m1x <- c(0)m2x <- c()for(i in 1:(n-1)){if(i%%2==0) m1x <-c(m1x,cfx[i]) else m2x <-c(m2x,cfx[i])}m2x <-c(m2x,cfx[n])m1y <- c(0)m2y <- c() for(i in 1:(n-1)){if(i%%2==0) m1y <-c(m1y,cfy[i]) else m2y <-c(m2y,cfy[i])}m2y <-c(m2y,cfy[n])frecuencia <- seq(0:((n-1)/2)) frecuencia <- frecuencia-1omega <- pi*frecuencia/(n/2)

Page 11: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

periodos <- n/frecuenciadensidad <- (m1x*m1y+m2x*m2y)/(4*pi)tabla <- data.frame(omega,frecuencia, periodos,densidad)data.frame(tabla[2:((n+1)/2),])}} cper <- cperiodograma(a,b)# Ordenamos de mayor a menor las densidades absolutas del periodograma, utilizando la funcion "sort.data.frame" function, Kevin Wright. Package taRifx S1 <- data.frame(f1=cper$frecuencia,p=abs(cper$densidad)) S <- S1[order(-S1$p),] id <- seq(2,n) m1 <- cbind(S$f1*2,evens(id)) if (n%%2==0) {m2 <- cbind(S$f1[1:(n/2-1)]*2+1,odds(id))} else {m2 <- cbind(S$f1*2+1,odds(id))} m <- rbind(m1,m2) colnames(m) <- c("f1","id") M <- sort.data.frame (m,formula=~id) M <- rbind(c(1,1),M) # Obtenemos la funcion auxiliar (cdf) del predictor y se ordena segun el indice de las mayores densidades absolutas del co-espectro. cx <- cdf(b) id <- seq(1,n) S1 <- data.frame(cx,c=id) S2 <- merge(M,S1,by.x="id",by.y="c") S3 <- sort.data.frame (S2,formula=~f1) m <- n+2 X1 <- S3[,3:m] X1 <- rbind(C=c(1,rep(0,(n-1))),S3[,3:m]) # Se realizan las regresiones en el dominio de la frecuencia utilizando un modelo con constante, pendiente y los arm?nicos correspondientes a las frecuencias mas altas de la densidad del coespectro. Se realiza un test de durbin para el residuo y se seleccionan aquellas que son significativas. par <- evens(id) i <- 1 D <- 1 resultado <- cbind(i,D) for (i in par) { X <- as.matrix(X1[1:i,]) cy <- gdf(a) B1 <- solve(X%*%t(X))%*%(X%*%cy) Y <- t(X)%*%B1 F <- gdt(Y) res <- (t(a) - F) T <- td(res,significance) L <- as.numeric(c(T$min<T$s2,T$s2<T$max)) LT <- sum(L) if (n%%2==0) {D=LT-n} else {D=LT-(n-1)} resultado1 <- cbind(i,D)

Page 12: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

resultado <- rbind(resultado,resultado1) resultado}resultado2 <-data.frame(resultado)criterio <- resultado2[which(resultado2$D==0),]sol <- as.numeric(is.na(criterio$i[1]))if (sol==1) {"no encuentra convergencia"} else { X <- as.matrix(X1[1:criterio$i[1],])cy <- gdf(a) B1 <- solve(X%*%t(X))%*%(X%*%cy) Y <- t(X)%*%B1 F <- gdt(Y) res <- (t(a) - F) datos <- data.frame(cbind(t(a),t(b),F,res)) colnames(datos) <- c("Y","X","F","res")list(datos=datos,Fregresores=t(X),Tregresores= t(MW(n))%*%t(X),Nregresores=criterio$i[1],Betas=B1)} }

Consumer Expenditure Survey

The Consumer Expenditure Survey (CE) program provides data on the buying habits of American consumers. CE also provides the data to the public for research in the Public-Use Microdata (PUMD). This survey collects 95 percent of the total expenditures and income by households. The current data set covers 2014 and the first quarter of 2015. The microdata files are in the public domain and, with appropriate credit, may be reproduced without permission. A suggested citation is: "U.S. Department of Labor, Bureau of Labor Statistics, Consumer Expenditure Survey, Interview Survey, 2014." The Interview Survey microdata are provided as SAS, STATA, SPSS. or ASCII comma-delimited files. The 2014 Interview release contains three groups of files: . 8 major data files (FMLI, MEMI, MTBI, ITBI, ITII, NTAXI, FPAR, and MCHI) . 4 types of processing files . 43 detailed expenditure data files (EXPN files)

Six of the eight major data files (FMLI, MEMI, MTBI, ITBI, ITII, and NTAXI) are organized by the calendar quarter of the year in which the data were collected. There are five1 quarterly data sets for each of these files, running from the first quarter of 2014 through the first quarter of 2015. The FMLI file contains CU characteristics, income, and summary level expenditures; the MEMI file contains member characteristics and income data; the MTBI file contains expenditures organized on a monthly basis at the UCC level; the ITBI file contains income data converted to a monthly time frame and assigned to UCCs; and the ITII file contains the five imputation variants of the income data converted to amonthly time frame and assigned to UCCs. The NTAXI file contains federal and state tax information for each tax unit within the CU. Monthly Expenditure File (MTBI)

In the MTBI file, each expenditure reported by a CU is identified by UCC, gift/nongift status, and month in which the expenditure occurred. UCCs are six digit codes that identify items or groups of items. The expenditure data record purchases that were made during the three month period prior to the month of the interview. Income File (ITBI) The "ITBI" file, also referred to as the "Income" file, contains CU characteristics and income data. This file is created directly from the FMLI file and contains the same annual and point-of-interview

Page 13: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

data in a monthly format. It was created to facilitate linking CU income and characteristics data with MTBI expenditure data. As such, the file structure is similar to MTBI. Each characteristic and income item is identified by UCC (For a list of the UCCs, see Istub), gift/nongift status, and month. Imputed Income File (ITII) As a result of the introduction of multiply imputed income data in the Consumer Expenditure Survey. It is very similar to the ITBI file, except that the variable IMPNUM. will indicate the number (1-5) of the imputation variant of the income variable and it only contains UCCs from variables subject to income imputation.

Data from the first quarter of 2014 are processed.

setwd("~/Word Press/Econometria aplicada/funcion de consumo USA")library(foreign) ingreso1<- data.frame(read.spss("itbi141x.sav"))ingreso1_i<- data.frame(read.spss("itii141x.sav"))gasto1 <- data.frame(read.spss("mtbi141x.sav"))ingreso2_i<- data.frame(read.spss("itii142.sav"))gasto2 <- data.frame(read.spss("mtbi142.sav"))ingreso3_i<- data.frame(read.spss("itii143.sav"))gasto3 <- data.frame(read.spss("mtbi143.sav"))ingreso4_i<- data.frame(read.spss("itii144.sav"))gasto4 <- data.frame(read.spss("mtbi144.sav"))ingresoT_i <- rbind(ingreso1_i,ingreso2_i,ingreso3_i,ingreso4_i)gastoT <- rbind(gasto1,gasto2,gasto3,gasto4)# obtenemos las sumas anualesING <- subset(ingresoT_i,ingresoT_i$IMPNUM==5)#ING <- tapply(datos$VALUE,datos$NEWID,mean)ING1 <- tapply(ING$VALUE,ING$NEWID,sum)ING1 <- data.frame(NEWID=names(ING1),ING=as.numeric(ING1))str(ING1)

## 'data.frame': 25894 obs. of 2 variables:## $ NEWID: Factor w/ 25894 levels "2647065","2647085",..: 1 2 3 4 5 6 7 8 9 10 ...## $ ING : num 11158 11088 37344 28447 64130 ...

GAST <- tapply(gastoT$COST,gastoT$NEWID,sum)GAST <- data.frame(NEWID=names(GAST),GAST=as.numeric(GAST))GAST$NEWID=as.character(GAST$NEWID)ING1$NEWID=as.character(ING1$NEWID)str(GAST)

## 'data.frame': 25907 obs. of 2 variables:## $ NEWID: chr "2647065" "2647085" "2647105" "2647115" ...## $ GAST : num 6004 53015 9853 29936 72290 ...

str(ING1)

## 'data.frame': 25894 obs. of 2 variables:## $ NEWID: chr "2647065" "2647085" "2647105" "2647115" ...## $ ING : num 11158 11088 37344 28447 64130 ...

Page 14: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

datos <- merge(GAST,ING1,by.x="NEWID",by.y="NEWID")summary(datos)

## NEWID GAST ING ## Length:25893 Min. :-1340261 Min. :-593355 ## Class :character 1st Qu.: 9900 1st Qu.: 22267 ## Mode :character Median : 37967 Median : 46067 ## Mean : 62100 Mean : 65348 ## 3rd Qu.: 80116 3rd Qu.: 85839 ## Max. : 2050207 Max. :1993323

An estimation of the Consumption Function for USA

Using OLS, the estimated coefficient for MPC is:

fit <-lm(datos$GAST~datos$ING)# Global test of model assumptionslibrary(gvlma)

## Warning: package 'gvlma' was built under R version 3.2.3

gvmodel <- gvlma(fit) summary(gvmodel)

## ## Call:## lm(formula = datos$GAST ~ datos$ING)## ## Residuals:## Min 1Q Median 3Q Max ## -1467242 -33261 -18768 13226 1953851 ## ## Coefficients:## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 2.282e+04 6.878e+02 33.18 <2e-16 ***## datos$ING 6.011e-01 7.296e-03 82.38 <2e-16 ***## ---## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1## ## Residual standard error: 79770 on 25891 degrees of freedom## Multiple R-squared: 0.2077, Adjusted R-squared: 0.2076 ## F-statistic: 6786 on 1 and 25891 DF, p-value: < 2.2e-16## ## ## ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS## USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:## Level of Significance = 0.05 ## ## Call:## gvlma(x = fit) ## ## Value p-value Decision

Page 15: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

## Global Stat 3205865.6 0 Assumptions NOT satisfied!## Skewness 63321.8 0 Assumptions NOT satisfied!## Kurtosis 3142206.1 0 Assumptions NOT satisfied!## Link Function 156.3 0 Assumptions NOT satisfied!## Heteroscedasticity 181.4 0 Assumptions NOT satisfied!

plot(gvmodel)

Detect and remove outlier

library(car)

## Warning: package 'car' was built under R version 3.2.3

out <- outlierTest(fit)quitar <- c(-as.numeric(names(out$p)))for (n in quitar)datos <- datos[n,]

Computing percentile rank in R

## Warning: package 'gtools' was built under R version 3.2.3

## ## Attaching package: 'gtools'## ## The following object is masked from 'package:car':

Page 16: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

## ## logit

By OLS, is estimated a consumption function, generating an interaction term into income and percentiles.

## Analysis of Variance Table## ## Response: datos$GAST## Df Sum Sq Mean Sq F value Pr(>F) ## datos$ING 1 4.3050e+13 4.3050e+13 7187.7381 < 2.2e-16 ***## datos$ING:datos$perc 99 2.4302e+12 2.4547e+10 4.0985 < 2.2e-16 ***## Residuals 25782 1.5442e+14 5.9894e+09

## ---## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Using OLS, is estimated a consumption function, with average household expenditure and income percentiles.

## ## Call:## lm(formula = gaperc.perc ~ ingpch.perc)##

Page 17: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

## Residuals:## Min 1Q Median 3Q Max ## -20873 -4022 -945 2873 33059 ## ## Coefficients:## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 2.101e+04 1.076e+03 19.53 <2e-16 ***## ingpch.perc 6.274e-01 1.162e-02 54.00 <2e-16 ***## ---## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1## ## Residual standard error: 7621 on 98 degrees of freedom## Multiple R-squared: 0.9675, Adjusted R-squared: 0.9672 ## F-statistic: 2916 on 1 and 98 DF, p-value: < 2.2e-16## ## ## ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS## USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:## Level of Significance = 0.05 ## ## Call:## gvlma(x = fit) ## ## Value p-value Decision## Global Stat 189.242 0.000e+00 Assumptions NOT satisfied!## Skewness 33.521 7.050e-09 Assumptions NOT satisfied!## Kurtosis 120.419 0.000e+00 Assumptions NOT satisfied!## Link Function 9.364 2.213e-03 Assumptions NOT satisfied!## Heteroscedasticity 25.938 3.526e-07 Assumptions NOT satisfied!

## function (x, y, ...) ## UseMethod("plot")## <bytecode: 0x00000000126fa300>## <environment: namespace:graphics>

## Warning: package 'descomponer' was built under R version 3.2.3

## Loading required package: taRifx

## Warning: package 'taRifx' was built under R version 3.2.3

Page 18: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

## Warning: package 'tseries' was built under R version 3.2.3

## ## Jarque Bera Test

Page 19: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

## ## data: fit$residuals## X-squared = 153.94, df = 2, p-value < 2.2e-16

## Warning: package 'nortest' was built under R version 3.2.3

## ## Lilliefors (Kolmogorov-Smirnov) normality test## ## data: fit$residuals## D = 0.12614, p-value = 0.0004788

## ## Cramer-von Mises normality test## ## data: fit$residuals## W = 0.52574, p-value = 1.517e-06

## ## Anderson-Darling normality test## ## data: fit$residuals## A = 3.1478, p-value = 6e-08

## ## Shapiro-Francia normality test## ## data: fit$residuals## W = 0.8649, p-value = 3.537e-07

The Durbin test (1969) shows error term is uncorrelated. In the normality test the Assumptions of linear regression are not satisfied.

Using RBS, is estimated a consumption function, with average household expenditure and income percentiles. The algorithm select the OLS model. Generalized linear models are implemented using "glm" function in R.

library(descomponer)# Estimación de la regresión por bandas de frecuenciay <- as.numeric(gaperc.perc)x <- as.numeric(ingpch.perc)res <- rdf(y,x,3)# grafica de los residuos en el dominio frecuencialgtd(res$datos$res,3)

Page 20: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

# Representación gráfica de los datosplot(ingpch.perc,gaperc.perc)lines(ingpch.perc,res$datos$F,col=2)

Page 21: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

# gráfica de normalidad de los residuoshist(res$datos$res, freq=FALSE, main="Distribución de los errores")

boxplot(res$datos$res)

Page 22: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

# Estimación del modelo en MCOfit3 <- lm(gaperc.perc ~ 0 + res$Tregresores)summary(fit3)

## ## Call:## lm(formula = gaperc.perc ~ 0 + res$Tregresores)## ## Residuals:## Min 1Q Median 3Q Max ## -20873 -4022 -945 2873 33059 ## ## Coefficients:## Estimate Std. Error t value Pr(>|t|) ## res$TregresoresC 2.101e+05 1.076e+04 19.53 <2e-16 ***## res$Tregresores1 6.274e+00 1.162e-01 54.00 <2e-16 ***## ---## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1## ## Residual standard error: 7621 on 98 degrees of freedom## Multiple R-squared: 0.9898, Adjusted R-squared: 0.9896 ## F-statistic: 4767 on 2 and 98 DF, p-value: < 2.2e-16

library(car)outlierTest(fit3)

Page 23: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

## rstudent unadjusted p-value Bonferonni p## (1.85e+05,2.03e+05] 4.951933 3.1031e-06 0.00031031## (2.11e+05,2.31e+05] 4.313066 3.8740e-05 0.00387400

gvmodel <- gvlma(fit3) summary(gvmodel)

## ## Call:## lm(formula = gaperc.perc ~ 0 + res$Tregresores)## ## Residuals:## Min 1Q Median 3Q Max ## -20873 -4022 -945 2873 33059 ## ## Coefficients:## Estimate Std. Error t value Pr(>|t|) ## res$TregresoresC 2.101e+05 1.076e+04 19.53 <2e-16 ***## res$Tregresores1 6.274e+00 1.162e-01 54.00 <2e-16 ***## ---## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1## ## Residual standard error: 7621 on 98 degrees of freedom## Multiple R-squared: 0.9898, Adjusted R-squared: 0.9896 ## F-statistic: 4767 on 2 and 98 DF, p-value: < 2.2e-16## ## ## ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS## USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:## Level of Significance = 0.05 ## ## Call:## gvlma(x = fit3) ## ## Value p-value Decision## Global Stat 189.242 0.000e+00 Assumptions NOT satisfied!## Skewness 33.521 7.050e-09 Assumptions NOT satisfied!## Kurtosis 120.419 0.000e+00 Assumptions NOT satisfied!## Link Function 9.364 2.213e-03 Assumptions NOT satisfied!## Heteroscedasticity 25.938 3.526e-07 Assumptions NOT satisfied!

#plot(gvmodel)# test normalidad de los erroreslibrary(tseries)jarque.bera.test(res$datos$res)

## ## Jarque Bera Test## ## data: res$datos$res## X-squared = 153.94, df = 2, p-value < 2.2e-16

Page 24: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

library(nortest)lillie.test(res$datos$res)

## ## Lilliefors (Kolmogorov-Smirnov) normality test## ## data: res$datos$res## D = 0.12614, p-value = 0.0004788

cvm.test(res$datos$res)

## ## Cramer-von Mises normality test## ## data: res$datos$res## W = 0.52574, p-value = 1.517e-06

ad.test(res$datos$res)

## ## Anderson-Darling normality test## ## data: res$datos$res## A = 3.1478, p-value = 6e-08

sf.test(res$datos$res)

## ## Shapiro-Francia normality test## ## data: res$datos$res## W = 0.8649, p-value = 3.537e-07

#Estimacion modelo glm (Gaussian)gfit3 <- glm(gaperc.perc ~ 0 + res$Tregresores,family=gaussian)summary(gfit3)

## ## Call:## glm(formula = gaperc.perc ~ 0 + res$Tregresores, family = gaussian)## ## Deviance Residuals: ## Min 1Q Median 3Q Max ## -20873 -4022 -945 2873 33059 ## ## Coefficients:## Estimate Std. Error t value Pr(>|t|) ## res$TregresoresC 2.101e+05 1.076e+04 19.53 <2e-16 ***## res$Tregresores1 6.274e+00 1.162e-01 54.00 <2e-16 ***## ---## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1##

Page 25: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

## (Dispersion parameter for gaussian family taken to be 58080075)## ## Null deviance: 5.5945e+11 on 100 degrees of freedom## Residual deviance: 5.6918e+09 on 98 degrees of freedom## AIC: 2075.5## ## Number of Fisher Scoring iterations: 2

par(mfcol = c(2, 2))plot(gfit3)

#Estimacion modelo glm (Gaussian)gfit3 <- glm(gaperc.perc ~ 0 + res$Tregresores,family=gaussian(link="log"))summary(gfit3)

## ## Call:## glm(formula = gaperc.perc ~ 0 + res$Tregresores, family = gaussian(link = "log"))## ## Deviance Residuals: ## Min 1Q Median 3Q Max ## -64850 -13382 -5885 7070 64065 ## ## Coefficients:## Estimate Std. Error t value Pr(>|t|)

Page 26: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

## res$TregresoresC 1.068e+02 4.125e-01 259.01 <2e-16 ***## res$Tregresores1 4.840e-05 1.859e-06 26.04 <2e-16 ***## ---## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1## ## (Dispersion parameter for gaussian family taken to be 369447538)## ## Null deviance: 5.5944e+11 on 100 degrees of freedom## Residual deviance: 3.6206e+10 on 98 degrees of freedom## AIC: 2260.5## ## Number of Fisher Scoring iterations: 6

par(mfcol = c(2, 2))plot(gfit3)

#Estimacion modelo glm (Gamma)#gfit3 <- glm(gaperc.perc ~ 0 + res$Tregresores,family=Gamma)#summary(gfit3)#par(mfcol = c(2, 2))#plot(gfit3)#Estimacion modelo glm (Gamma)gfit3 <- glm(gaperc.perc ~ 0 + res$Tregresores,family=Gamma(link="identity"))summary(gfit3)

Page 27: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

## ## Call:## glm(formula = gaperc.perc ~ 0 + res$Tregresores, family = Gamma(link = "identity"))## ## Deviance Residuals: ## Min 1Q Median 3Q Max ## -0.37041 -0.07242 -0.01830 0.05965 0.90545 ## ## Coefficients:## Estimate Std. Error t value Pr(>|t|) ## res$TregresoresC 2.201e+05 9.322e+03 23.62 <2e-16 ***## res$Tregresores1 6.011e+00 2.329e-01 25.81 <2e-16 ***## ---## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1## ## (Dispersion parameter for Gamma family taken to be 0.02740951)## ## Null deviance: NaN on 100 degrees of freedom## Residual deviance: 2.1474 on 98 degrees of freedom## AIC: 2078.3## ## Number of Fisher Scoring iterations: 8

par(mfcol = c(2, 2))plot(gfit3)

Page 28: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

# Durbin de los errores de Gammapar(mfcol = c(1, 1))gtd(gfit3$residuals,3)

GLM produces similar results to OLS.

We make a data set with average propensity to consume (PMeC) and marginal propensity

to consume (PMgC) calculated for Group, the PMec are obtained by cs

ys, the PMgC in OLS

model is b, the PMgC in RBS model is cs− ays

and the tendency lines is obtained by bys

.

# Obtención de las propensiones medias al consumo por percentilesPMeC <- data.frame(percentil=seq(1,100,by=1),observado=gaperc.perc/ingpch.perc,estimado_MCO=lm(gaperc.perc~ingpch.perc)$fitted/ingpch.perc, estimado_MCO2=ingpch.MCO2/ingpch.perc,estimado_RBS=res$datos$F/ingpch.perc)#PMeC# Obtención de las propensiones marginales al consumo por percentilesPMgC <- data.frame(percentil=seq(1,100,by=1),estimado_MCO=rep(lm(gaperc.perc~ingpch.perc)$coefficients[2],100), estimado_RBS=(res$datos$F-(res$Betas[1]*res$Tregresores[1]))/ingpch.perc,estimado_RBS_T=(res$Bet

Page 29: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

as[2]*res$Tregresores[,2])/ingpch.perc)#PMgC# Obtención de las propensiones marginales al consumo por percentiles con glmPMgC_glm <- data.frame(percentil=seq(1,100,by=1),estimado_MCO=rep(lm(gaperc.perc~ingpch.perc)$coefficients[2],100), estimado_RBS=(gfit3$fitted.values-(gfit3$coefficients[1]*res$Tregresores[1]))/ingpch.perc,estimado_RBS_T=(gfit3$coefficients[2]*res$Tregresores[,2])/ingpch.perc)#PMgC_glm

# gráficos PMeCplot(PMeC$percentil,PMeC$observado)lines(PMeC$percentil,PMeC$estimado_MCO,col=2)lines(PMeC$percentil,PMeC$estimado_RBS,col=3)legend("top", ncol=2,c("MCO","RBS"),cex=0.6,bty="n",fill=c(2,3))

# gráficos PMgCplot(PMgC$percentil,PMgC$estimado_RBS,type="l",col=1)lines(PMgC$percentil,PMgC$estimado_RBS_T,col=2)lines(PMgC$percentil,PMgC$estimado_MCO,col=3)legend("top", ncol=3,c("RBS","RBS_T","MCO"),cex=0.6,bty="n",fill=c(1,2,3))

Page 30: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

# gráficos PMgC_glmplot(PMgC_glm$percentil,PMgC_glm$estimado_RBS,type="l",col=1)lines(PMgC_glm$percentil,PMgC_glm$estimado_RBS_T,col=2)lines(PMgC_glm$percentil,PMgC_glm$estimado_MCO,col=3)legend("top", ncol=3,c("RBS","RBS_T","MCO"),cex=0.6,bty="n",fill=c(1,2,3))

Page 31: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

Conclusions

Bunting ( 1989) think that the states that the definition of the variables of income and expenses, including consideration or not in per capita terms , the form to data are organized by income interval, highly aggregated, determine the different MPC in consumption function. Usually , the MPC based on Keynesian consumption functions , the data are grouped at reasonable intervals income , established based on knowledge of the researcher. In another hand, the econometric estimation of the MPC the error term must be independent by group and homocedastic.

This requires estimating MPC by other methods that solve nonlinear specifications of consumption function . In the estimates made of the MPC Keynesian in other areas ( Mexico , Argentina and Spain ) (Annexes ), by OLS and data grouping by percentils, we found normality problems in the error term : dependency between the errors obtained and the class ( percentile ) , unconstant variance, and extreme values , so the approach of grouping households income percentils in OLS , do not give satisfactory results from the point of view of gaussianas. Estimation made with RBS and GLM could be a solution to these problems in error terms.

The MPC estimated by OLS , RSB and GLM offers similar results, as the error term in OLS has no problems of independence and constant variance.

USA estimates compared with other areas they are in the following table :

Country (year)

Page 32: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

Spain(2014)

Mexico(2014)

Argentina(2012)

USA (2014)

Fuente: Elaboración Propia

Bibliografía

Bunting, D., 1989."The compsumption function paradox" Journal of Post Keynesian Economics. vol 11, nº 3, 1989, pp. 347-359.

Bunting, D., 2001."Keynes Law and Its Critics" Journal of Post Keynesian Economics vol. 24, nº 1, 2001, pp. 149- 163.

DURBIN, J., "Tests for Serial Correlation in Regression Analysis based on the Periodogram ofLeast-Squares Residuals," Biometrika, 56, (No. 1, 1969), 1-15.

Engle, Robert F. (1974), Band Spectrum Regression,International Economic Review 15,1-11.

Friedman, M., 1957. A theory of the consumption function (Princeton University Press, Princeton, NJ).

Friedman, M. and Kuznets, S., 1945. Income from independent professional practice (National Bureau of Economic Research, NY).

Harvey, A.C. (1978), Linear Regression in the Frequency Domain, International Economic Review, 19, 507-512.

INDEC (2012/2013). Encuesta Nacional de Gasto de los Hogares (ENGHo). Buenos Aires: Instituto Nacional de Estadísticas y Censos.

Keynes, J. M., 1936. The general theory of employment, interest and money (Harcourt, Brace & World, NY).

Kuznets, S., 1942. Uses of national income in peace and war, Occasional paper 6 (National Bureau of Economic Research, NY).

Modigliani, F. and Brumberg, R., 1954. "Utility analysis and the consumption function: an interpretation of cross-sectional data" in Kurihara, K. K. (ed.) Post Keynesian economics (Rutgers University Press, New Brunswick, NJ) 388-436.

Parra F (2015): Seasonal Adjustment by Frequency Analysis. Package R Version 1.2. https://cran.r-project.org/web/packages/descomponer/index.html

U.S. Department of Labor, Bureau of Labor Statistics, Consumer Expenditure Survey, Interview Survey, 2014

Anexos

Page 33: Marginal Propensity to Consume in USA Web viewMarginal Propensity to Consume in USA. ... The objective is estimate a marginal propensity to consume ... ## ## Cramer-von Mises normality

Propensión marginal al consumo de Argentina: https://rpubs.com/PacoParra/136937

Propensión marginal al consumo de España: https://rpubs.com/PacoParra/164650

Propensión marginal al consumo de México: https://rpubs.com/PacoParra/139911