Results 1 to 7 of 7

Math Help - Question on dummy variables

  1. #1
    Newbie
    Joined
    Nov 2009
    From
    Beijing
    Posts
    12

    Question Question on dummy variables

    Dear all,

    I have a question I met in my project.

    I have a panel data, including 20 cities and there are 18 years OBS (x and y) for each city. I want to establish a equation with dummy variables for control time-invariant city-specific characteristics and control for time trend.

    Thus my equation is:
    Y = a1 + a2*X + a3*D_city + a4*D_year (1)
    Where, D_city and D_year are dummiy variables for controling variant of city and time. So I have two dummy variables.

    But If I do that, is it correct that I actually assumed a common time trend for each city? (question 1)
    It maybe not correct since each city has their own time trend features. So I want to give a city-specific time trend.

    Thus I have another function form:
    Y = a1 + a2*X + a3*D_city + a4*D_city*year (2)
    Others are the same with previous function except the last term which I multiple D_city with value of year.
    So the equ(2) could change to
    Y = a1 + a2*X + D_city(a3 + a4*year) (3)
    In the form, can I say I considered city-specific time trend? (question 2)

    Finally, I tried the equ(2) in R by inputting:
    D_city<-as.factor(data$city)
    result<-lm(Y~X + D_city + D_city*year,data)
    But I don't think R gave me the result I need. How can I do this? (question 3)

    Thanks!
    Regards,
    Tianyi
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Nov 2009
    From
    Beijing
    Posts
    12
    Nobody knows?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Joined
    Mar 2010
    From
    Florida
    Posts
    3,093
    Thanks
    5
    You need 1 less dummy variables for each case. What is your time trend? Every year? every two years? ....

    Since you have 20 cities, you need 19 dummy variables to differentiate cities. How ever you break up the years you will need 1 less dummy variable.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Nov 2009
    From
    Beijing
    Posts
    12
    Quote Originally Posted by dwsmith View Post
    You need 1 less dummy variables for each case. What is your time trend? Every year? every two years? ....

    Since you have 20 cities, you need 19 dummy variables to differentiate cities. How ever you break up the years you will need 1 less dummy variable.
    Thanks for the reply.

    I know I have to give one less dummy. But my question is people have three ways to control year by setting dummies. I don't know the difference and how to deal with them.
    I have an example. Pls download the PDF file below.
    http://people.few.eur.nl/vollebergh/..._EKC%20ERE.pdf
    In page 4, G(t) is function for controlling time trend.
    In page 9, Note3, there are three functions for G(t); 1) time-fixed effects, 2) general time trend, 3) country-specific trend.
    I think what you said is the first one, assuming time-fixed effects (break up years by setting dummies). But how about the second and the third?
    To my understanding, for the second specification, ones multiple one set Beta with value of year, and the third one is to multiple country dummies with year for representing the time trend vary with countries. Is it correct?

    Regards,
    Tianyi
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor
    Joined
    Mar 2010
    From
    Florida
    Posts
    3,093
    Thanks
    5
    Don't know about general but country specific would be just having a country dummy variable.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Nov 2009
    From
    Beijing
    Posts
    12
    Quote Originally Posted by dwsmith View Post
    Don't know about general but country specific would be just having a country dummy variable.
    Yes, I think so. Country-specific time trend is country-dummy multiples year value (Beta_i is just the country-dummy in that paper). Maybe general time trend maybe just he year series (Beta would be one??!!No idea).
    Another question is what the difference when the three time control function involved in the equation? Do they represent different meaning?

    Finally, dwsmith, THANK YOU VERY MUCH!!!!!
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Mar 2011
    Posts
    1

    creating country dummies

    Quote Originally Posted by zhangty View Post
    Yes, I think so. Country-specific time trend is country-dummy multiples year value (Beta_i is just the country-dummy in that paper). Maybe general time trend maybe just he year series (Beta would be one??!!No idea).
    Another question is what the difference when the three time control function involved in the equation? Do they represent different meaning?

    Finally, dwsmith, THANK YOU VERY MUCH!!!!!

    Hello,
    I just read this post. So I hope you are also familiar with my question: I'm having a panel data set with different country pairs over 10 years. I know already how to create the year dummies in STATA. However, I was wondering how to create the country pair dummies. Is it jsut the amount of countrypairs I have?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Bivariate regression, dummy variables and r^2
    Posted in the Statistics Forum
    Replies: 0
    Last Post: October 18th 2011, 12:48 PM
  2. Too many dummy variables?
    Posted in the Statistics Forum
    Replies: 0
    Last Post: July 9th 2011, 04:08 AM
  3. dummy variables
    Posted in the Statistics Forum
    Replies: 0
    Last Post: August 31st 2010, 01:50 AM
  4. Question on dummy variables
    Posted in the Statistics Forum
    Replies: 0
    Last Post: March 8th 2010, 12:20 PM
  5. The dummy variable
    Posted in the Calculus Forum
    Replies: 3
    Last Post: December 24th 2009, 03:01 AM

Search Tags


/mathhelpforum @mathhelpforum