Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cross sectional regression commands & Fama MacBeth regression (xtfmb) issues

    Hello everyone,

    I would like to make cross sectional regressions over 60 months following the Fama MacBeth procedure. However, I can't figure out how to run it correctly, when I enter "xtfmb x y" with x and y as my variables I get a series of "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx". Is this problem familiar to someone ?

    On the other hand do you know how to simply ask STATA to run a cross sectional regression on a particular date ? I mean, if I want to run a cross sectional regression for the month number 12 for example using my entire data set, is it possible ?

    Thanks in advance (I am a begginer),

    Geolien,

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    You can limit the data used for almost any command in Stata by including an if condition at the end of the statement:
    reg y x if month== 12 & year==2001
    or
    reg y x if month== 12

    xtfmb is user written. While sometimes you'll get answers to user written procedures on this listserve, sometimes you need to contact the authors. Note that you can access the details of the ado file and try to see what is going on if you want to do so.

    Comment


    • #3
      Dear Phil,

      Thank you for your answer. I'll be careful about how to ask and present questions next time.
      I take note of the if condition and I'll try to figure out about xtfmb.
      (You can find attached a print screen of what I get actually).

      Geolien,
      Click image for larger version

Name:	xtfmb.PNG
Views:	1
Size:	38.9 KB
ID:	1445559

      Comment


      • #4
        Perhaps the following thread will help.

        Comment


        • #5
          Dear Robert,

          Thank you for the link

          Comment

          Working...
          X