+ Reply to Thread
Results 1 to 4 of 4

Panel Data Regression in Excel

Hybrid View

  1. #1
    Registered User
    Join Date
    07-05-2010
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    4

    Panel Data Regression in Excel

    Hi All,

    I have been looking around the internet to see if I can undertake a panel data regression in excel but have not seen anything obvious. Everything I read says it can be done in STATA but I would still like to know if it can be done in excel. I want to do a fixed effects model:

    yit = a + bxit + εit

    Can I do this with Linest?

    I have a panel of data for prices and demand for a good for a number of countries for a number of years and instead of modelling an individual elasticity for each country I would like to treat the data as a panel and get one elasticity.

    Can the known y's in linest be two dimensional i.e. a seperate row for each individual countries demand tim series? Or do I have to put all the demand time series into one row somewhow? If the different country time series are in different rows as the known's can i still do multivariate regression i.e. a corresponding number of price rows for the different countries but some other explanatory variables too?

    Thanks,
    Eoin

  2. #2
    Registered User
    Join Date
    07-05-2010
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Panel Data Regression in Excel

    I can divide this question into three parts:

    1. Using Linest the four arguments are - known Y´s, known X´s, intercept and statistics, the last two being binary true or false. Using the following example data linest will work fine:

    Row1(known Y's -Weekly Income) 80;100;120;140;160
    Row 2(Known X's - Weekly Consumption Expenditure) 55;65;79;80;102

    If instead I have the have the following

    Row1(known Y's -Weekly Income person 1) 80;100;120;140;160
    Row2(known Y's -Weekly Income person 2) 85;105;125;145;165
    Row 3(Known X's - Weekly Consumption Expenditure person 1) 55;65;79;80;102
    Row 4(Known X's - Weekly Consumption Expenditure person 2) 65;75;89;90;112

    and using linest I select two rows of data as known Y´s and two rows of data as X´s how is linest interpreting the second row in the known Y´s (row 2)? When I do this myself I get an output but I don´t know how to interpret it.

    2. Modifying the previous example slightly if I have the following

    Row1(known Y's -Weekly Income person 1) 80;100;120;140;160
    Row2(known Y's -Weekly Income person 2) 85;105;125;145;165
    Row 3(Known X's - Weekly Consumption Expenditure person 1) 55;65;79;80;102
    Row 4(Known X's - Weekly Consumption Expenditure person 2) 65;75;89;90;112
    Row 5(Known X's - Savings Interest rate) 2%, 2%, 2%,2%, 2%

    and using linest I select two rows of data as known Y´s and three rows of data as X´s how is linest interpreting row 5 in the known X's? When I do this myself I get an error...

    3. We know that one can do two variable regression and multivariate regression in excel from first principles, using the linest function or using the data analysis pack. In such regressions the dependent and explanatory variables are all in one dimension e.g a time series or ordered cross sectional data. If instead the dependent and explanatory variables are in two dimensions e.g. a time series with a number of entries for each time period , i.e. panel data (such as in the examples above), can such a regression be done in excel?

    Thanks,
    Eoin

  3. #3
    Registered User
    Join Date
    07-05-2010
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Panel Data Regression in Excel

    Bump no response

  4. #4
    Registered User
    Join Date
    07-05-2010
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Panel Data Regression in Excel

    This proved to be quite easy to do in excel after all. Instead of having lots of rows of related data one just makes one big row for each data category. Using the above example I should do the following:

    Row 0( Category : Person 1 or Person 2)
    Row 1(known Y's -Weekly Income for person 1 followed by person 2)
    Row 2(Known X's - Weekly Consumption Expenditure for person 1 followed by person 2)
    Row 3(Known X's - Savings Interest rate)
    Row 4 (Dummy Person 1)
    Row 5 (Dummy Person 2)

    which in data would be

    P1 P1 P1 P1 P1 P2 P2 P2 P2 P2
    80;100;120;140;160; 85;105;125;145;165
    55; 65; 79; 80;102; 65; 75; 89; 90;112
    .02; 02; 02; 02; 02; 02; 02; 02; 02; 02
    1; 1; 1; 1; 1; 0; 0; 0; 0; 0
    0; 0; 0; 0; 0, 1; 1; 1; 1; 1

    Then I do =linest(Row1;Row2-5;0;1)

    By including regression through the origin and the dummy variables I get a different constant for person 1 and person 2. It does not matter that linest only works with two dimensional data as long as each explanatory variable corresoponds to a dependant variable.

    This is solved:-)
    Last edited by eoino; 09-06-2010 at 09:34 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1