Announcement

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

  • Suest command: unable to generate scores error with different regression models

    Dear all,

    I have a following problem. Firstly, I am calculating 2 regressions for for two groups of subsample and testing the difference. Secondly, I am calculating 2 additional regressions for the other subsample groups and also testing the difference of coefficients. The task is to calculate the difference of previously calculated differences (sorry, if it sounds strange). At this stage Stata gives me an error unable to generate scores for model storedresults* suest requires that predict allow the score option.

    I have a following code:
    Code:
    Stage #1
    reg alpha MKTRF if status==1 & port==1
    est sto capmst_long
    reg alpha MKTRF if status==1 & port==2
    est sto capmst_short
    suest capmst_long capmst_short
    lincomest [capmst_long_mean]_cons - [capmst_short_mean]_cons
    est sto capm1
    
    Stage #2
    reg alpha MKTRF if status==2 & port==1
    est sto capmnst_long
    reg alpha MKTRF if status==2 & port==2
    est sto capmnst_short
    suest capmnst_long capmnst_short
    lincomest [capmnst_long_mean]_cons - [capmnst_short_mean]_cons
    est sto capm2
    
    Stage #3 with error 
    suest capmst_long capmnst_long
    lincomest [capmst_long_mean]_cons - [capmnst_long_mean]_cons
    est sto capm_long_diff
    suest capmst_short capmnst_short
    lincomest [capmst_short_mean]_cons - [capmnst_short_mean]_cons
    est sto capm_short_diff
    suest capm_long_diff capm_short_diff
    Would be very grateful for any suggestions!







    Regards,
    Orif
    Using Stata 16/MP

  • #2
    For what you have shown before the error occurred, I think it is enough information.

    However then pick up the code where the error occurs, and copy and paste exactly what you typed at Stata, and exactly what Stata returned.

    Comment


    • #3
      Originally posted by Joro Kolev View Post
      For what you have shown before the error occurred, I think it is enough information.

      However then pick up the code where the error occurs, and copy and paste exactly what you typed at Stata, and exactly what Stata returned.
      Joro, this is what I type in Stata and the error, which occurs afterwards:


      Code:
      . suest capm_long_diff capm_short_diff
      unable to generate scores for model capm_long_diff
      suest requires that predict allow the score option
      r(322);
      Regards,
      Orif
      Using Stata 16/MP

      Comment


      • #4
        I think then you are overestimating what -suest- can do. I think you take -suest- to be a general tool, that can do "things jointly" after every step you make.

        But it is not like this. After some particular commands, -suest- can join them.

        In this particular case you seem to be trying a super-suest, that is, you seem to be trying to apply -suest- on a previous -suest- result.

        Originally posted by Orifjon Kurbanov View Post

        Joro, this is what I type in Stata and the error, which occurs afterwards:


        Code:
        . suest capm_long_diff capm_short_diff
        unable to generate scores for model capm_long_diff
        suest requires that predict allow the score option
        r(322);

        Comment


        • #5
          Originally posted by Joro Kolev View Post
          I think then you are overestimating what -suest- can do. I think you take -suest- to be a general tool, that can do "things jointly" after every step you make.

          But it is not like this. After some particular commands, -suest- can join them.

          In this particular case you seem to be trying a super-suest, that is, you seem to be trying to apply -suest- on a previous -suest- result.


          Okay, thank you for this comment. I really might be thinking wrongly since I am not a proficient user of Stata yet.
          Maybe you can advice some other solutions for my problem?
          Regards,
          Orif
          Using Stata 16/MP

          Comment


          • #6
            Orif.
            I'm probably late to the party (or have already had too much fun in a previous one ), but why not running something like:
            Code:
            regress alpha MKTRF i.status##i.port
            and then -test- or -testparm-?
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Orif.
              I'm probably late to the party (or have already had too much fun in a previous one ), but why not running something like:
              Code:
              regress alpha MKTRF i.status##i.port
              and then -test- or -testparm-?
              Thanks, Carlo, I've tried this one, but I am not sure how to access the reference category if I want to test the difference between intercept of each group. Basically, I do not need coefficients other than _cons for each group.
              Regards,
              Orif
              Using Stata 16/MP

              Comment

              Working...
              X