Announcement

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

  • #16
    It's disappointing to everyone concerned that you didn't get the answers you wanted. It will be true on any other website carrying Stata questions that very few people answering questions will know your precise research topic and they will expect precise code.

    In any case nothing stops you inventing data with similar structure or using a dataset available in Stata and translating your basic Stata question to that framework.

    You cannot delete anything here other than your own answers posted in the last hour.

    Comment


    • #17
      I will try for the last time with the data attached.

      nl(DV={b0}+(dummy)*({b1}*IV)+ (1-dummy)*({b2}*IV)),vce (hac nw 8)

      where IV and DV and dummy variables attached.
      the data is daily and I want to generate beta coefficient values by date, that is b1 for 05/01/2000, 06/01/2000 ....,25/12/2013. the b1 values should not be the same everyday. so I can use as a new variable in my regression models later.







      Attached Files
      Last edited by abdelrazzaq alrababaa; 02 Jan 2016, 07:44.

      Comment


      • #18
        A spreadsheet attachment is effectively invisible to many of us, as we can't or won't open it. The FAQ Advice, which you have been asked to read several times, does explain this. (Compare http://www.statalist.org/forums/foru...uare-after-var as well as references to the FAQ in this thread.)

        That aside: you appear to be fitting the model to all your data. Therefore there is no obvious sense in which the coefficient estimates will differ for different daily dates.

        Comment


        • #19
          It seems will take more time... I don't want to waste my time here more, so thank you again sorry for asking crazy questions!​! In my last posts I just asked to look ONLY at the equation in the paper with no need to understand the whole topic. I am sure if someone looked at the equations in the paper and use my data and my equation, then will be easy for him to understand what I want.

          Will not use Stata forum again.

          Comment


          • #20
            From my perspective you appeared to be very unclear, and still to be confused, on what you want.

            The unwillingness of people here to read a paper read all your posts. read in your data (only just supplied), and then tie that all together is- possibly apparent rather than real given the time of year. But it is a secondary issue, so please don't blame on the forum or its members.

            If you want to fit a model repeatedly for a series of dates, you need to do precisely that, fit a model repeatedly. Equally, if there were a bundle of coefficients to extract after the nl fit they would be explicit in the output.

            Comment


            • #21
              A quick look at the paper gives me the impression that what abdelrazzaq wants is the following:
              Suppose that I have N firms. I run a time series regression for each firm. This gives me a "beta" coefficient" for each firm.
              How do I put these N beta coefficients in a series of dimension N?
              Last edited by Eric de Souza; 02 Jan 2016, 10:10. Reason: Added: But he has probably gone away now. I had the same problem understanding what he meant as others did.

              Comment


              • #22
                ​ Thank you Eric.
                " Equally, if there were a bundle of coefficients to extract after the nl fit they would be explicit in the output" this is what I am asking about!!! ok then which code I can use to extract. it is about regressing one series on other then extracting beta coefficient for each date without a running a regressing repeatedly, just running once only and extract. I see that in many papers, so should be easy!!!

                Comment


                • #23
                  The paper you mention - and others I have seen - do not run one regression. They run several regressions and save the coefficients to construct a series. In the paper you attached, a regression is run for each i over t. A new series is then constructed with the coefficients of the regressions.
                  Last edited by Eric de Souza; 02 Jan 2016, 11:28. Reason: Added. You could probably run one seemingly unrelated regression model (which is in fact several regressions in one system) or equivalently a panel data model with heterogeneous coefficients; and save

                  Comment


                  • #24
                    Do you mean that I need to run 1540 separate regressions (i.e. 1540 days)? Do you think the authors of the papers (that one I attached and the others you have read) did that same with about 1000 observations. Other computer programs allow us to run the regression with all observations at hand only once. Also in that paper and others they do not menitioned clearly that they ran a separate regressions.

                    Comment


                    • #25
                      The authors do not run regressions for each day, as far as I can see, but for each stock using daily data: "We proceed by estimating the basic regression in Eq. (4) with "OLS using daily data for each stock separately"

                      Comment


                      • #26
                        yes, I am going to do the same for each DV variable using the daily data and I want to extract the beta coefficient for each day. They did the same, but with different DVs.

                        Comment


                        • #27
                          They did not do the same, meaning that they did not extract the beta coefficient for each day. They extracted the beta coefficient for each stock

                          Comment


                          • #28
                            Thank you Eric ;

                            However, I am almost 100% that there is a way to do that, take the average, I see you are professor in economics, so you are the best person who can understand what I am talking about and hence can help
                            please see attached paper used the same approach, please just see page 1380 on monthly regression and advice.

                            If you think that I should use the SUR regression, then which code can give me the coefficient series for my regressions. many thanks again
                            Attached Files
                            Last edited by abdelrazzaq alrababaa; 04 Jan 2016, 07:30.

                            Comment


                            • #29
                              I was wondering if anyone would be to please offer me some advice concerning STATA?

                              I am running an SUR regression of the form:

                              y1 = x1 + x2
                              y2 = x1 + x2

                              and use the tesltn command to test: _[y1]x1 / _[y1]x2 = _[y2]x1 / _[y2]x2

                              I have tried defining this as a constraint and running sureg with it, however, STATA does not permit me to do so, because the constraint is non-linear (?).

                              I have spent hours on the internet trying to found out what I can do about this,but it seems like although people have had this problem, no one has posted a solution. I have also triednlsur and nlcom commands, however, have been unable to achieve the SUR regression with the constraint.

                              Do you have any advice on overcoming this problem?

                              Thank you for your time,

                              Jaspal Buttar

                              Comment


                              • #30
                                I was wondering if anyone knows how to help me please?

                                I am running an SUR regression of the form:

                                y1 = x1 + x2
                                y2 = x1 + x2

                                and use the tesltn command to test: _[y1]x1 / _[y1]x2 = _[y2]x1 / _[y2]x2

                                I have tried defining this as a constraint and running sureg with it, however, STATA does not permit me to do so, because the constraint is non-linear (?).

                                I have spent hours on the internet trying to found out what I can do about this,but it seems like although people have had this problem, no one has posted a solution. I have also triednlsur and nlcom commands, however, have been unable to achieve the SUR regression with the constraint.

                                Do you have any advice?
                                Thank you for your time,

                                Jaspal Buttar

                                Comment

                                Working...
                                X