Econometrics
R session
Keisuke Kawata
IDEC
R command: Probit
• To estimate the probit model as;
Pr � � ℎ � , �ℎ � = Φ � + � ℎ � + � �ℎ � ,
you should use command glm;
probit<-glm(dfmfd ~ educhead + sexhead, data=data_name, family = binomial(link
= "probit"))
and summary(probit)
• The marginal effect can be estimated by probitmfx within package mfx as library(mfx)
probitmfx(dfmfd ~ educhead + sexhead, data=test)
Econometrics
Quantile regression approach
Keisuke Kawata
IDEC
Beyond the average effect
• In this course, we focus on the average effect;
� � − � � ′
• Sometimes, policy makers have an interest not only for the average effects but also for
(Reminder) Average is one of summarized value of the distribution. e.g.) The impact of treatments on income
Average effect is positive ⇒Good treatments?
Y(0) Y(1) Prof I 2000 20000 Prof K 1000 2000
Prof Y 500 0
Example of research question
By using quantile regression approach, you can answer following questions;
• Can microfinance program decrease income inequality?
• Can small size class improve test-score in lower-score group?
Quantile (Percentile)
• qth quantile (percentile) value Qq Yi : the value is higher than q% of o se atio s’ alue.
e.g.,) Distribution of income
Q8 Yi =
Income among male Income among female
100 80
90 50
70 40
60 30
20 10
Conditional quantile (Percentile)
• Conditional qth quantile (percentile) value Qq Yi|Ti = T : Among T groups, the alue is highe tha % of o se atio s’ alue.
e.g.,) Distribution of income
Income among male Income among female
100 80
90 50
70 40
60 30
Estimation of population quantile
• If your data is pure-random sampling, you can obtain estimated population quantile, ��, to minimize
�= : � ��
�
� � − �� +
�= : � ��
�
− � �� − �
Quantile (causal) effects
• By using potential outcome framework, we can define the
⇒The effect of treatment on the value of qth quantile.
• One of natural estimator is the difference of sample quantile:
�� � |�� = − �� � ′ |�� = ′
• Above estimator is unbiased if your data is pure-random sampling and the distribution of � do not depend on treatment status;
Quantile regression
• If you would like to estimate effects of continuous treatments and/or incorporate control variables, sample difference is not useful estimators
⇒ should use the quantile regression approach.
• We specify the model of conditional quantile as
�� � �� = �, � = = � � + ���� + �� or
� = � � + ����� + �� � + ��
Note: We allow in different quantile.
Quantile regression
• The estimator of coefficients can be obtained to minimize
�= : � ����+� �
�
� � − ���� − � � +
�= : � ����+� �
�
− � ���� + � � − �
We can obtain unbiased estimators of �� if
• Pure-random sampling data
• Conditional independency of error terms
Quantile effects
• By using estimated ��, we can define estimated quantile effects in qth quantile as
�� � �� = + , � = − �� � �� = , � = = ���
Notion: Interpretation
• You should take care about interpretation of quantile effects.
• Quantile effects are defined on the distribution;
⇒should e i te p eted as the effe t of t eat e ts o the qth quantile value of the distribution is �� .
⇒should ot e i te p eted as the effe t of t eat e ts o the out o e of
Interpretation: example
Potential outcome with t=0 Potential outcome with t=1
= =
= =
= =
= =
= =
• The 80th ua tile effe t is 1 .
• The effect on outcomes of individual in 80th quantile (b) is -2.
• O ly if e a suppose the o de of out o e is ot ha ged, e a interpreted as the effect on not only distribution but also individual.
R command: Quantile regression
• The quantile effect can be estimated by rq within package quantreg.
• To estimate the qth quantile effect of dfmfd on exptot, library(quantreg)
qreg1<-rq(exptot ~ dfmfd, tau=0.q , data=test) summary(qreg1)