Linear Constraints in Regression Model (Self Study)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I did an F-test on a very simple linear regression model for test if the two coefficients have the same effect on the dependent variable y:



i will call this below Original Regression :



$y_t=hatbeta_1+hatbeta_2x_2+hatbeta_3x_3$



and this is the output in gretl of my regression



enter image description here



this is the main idea of what i'm testing:



$H0: beta_2=beta_3$



$H1: beta_2neqbeta_3$



my professor told that for run this type of test i have to rearrange my model in an



Equivalent Regression:



$y_t=hatbeta_1+(hatbeta_2-hatbeta_3)x_2+hatbeta_3(x_2+x_3)$



so now i can express the equivalent hypothesis sistem:



$H0: beta_2-beta_3=0$



$H1: beta_2-beta_3neq0$



the F-statistics:



$F=frac[ER]RSS-[OR]RSSm*fracT-k[OR]RSS$



$m$ are the restrictions: in this case $m=1$



so now i have an output of gretl about my test



enter image description here



from this point on i tried to get the same result of the test in gretl but i can't get the same result.



i write my try: the only thing i need for run my test id $[ER]RSS$



but the second output of gretl gave me the S.E of Regression, so $S=3.11144$



since i know that the estimate of Variance of regression is $S^2=frac[ER]RSST-k$



$T-k=5-3$



so i solved and obtained



$[ER]RSS=19.36211$



so the F-stat:



$F=frac19.36211-6.251*frac5-36.25=4.1958$



this is different from gretl output! of $F=7.29383$



gretl seems to use a derivation of $S^2=fracRSST-k+1$ so if you solve for this you will obtain $[ER]RSS=29.043$ and obtain once again the F-stats you will get the same result $F=7.29383$



My questions are:



(1) where am i doing the test wrong?



(2) how do i get by hand the same coefficients of the output in gretl? i mean $beta2=1.59549=beta3$?



Thank You







share|cite|improve this question
























    up vote
    0
    down vote

    favorite












    I did an F-test on a very simple linear regression model for test if the two coefficients have the same effect on the dependent variable y:



    i will call this below Original Regression :



    $y_t=hatbeta_1+hatbeta_2x_2+hatbeta_3x_3$



    and this is the output in gretl of my regression



    enter image description here



    this is the main idea of what i'm testing:



    $H0: beta_2=beta_3$



    $H1: beta_2neqbeta_3$



    my professor told that for run this type of test i have to rearrange my model in an



    Equivalent Regression:



    $y_t=hatbeta_1+(hatbeta_2-hatbeta_3)x_2+hatbeta_3(x_2+x_3)$



    so now i can express the equivalent hypothesis sistem:



    $H0: beta_2-beta_3=0$



    $H1: beta_2-beta_3neq0$



    the F-statistics:



    $F=frac[ER]RSS-[OR]RSSm*fracT-k[OR]RSS$



    $m$ are the restrictions: in this case $m=1$



    so now i have an output of gretl about my test



    enter image description here



    from this point on i tried to get the same result of the test in gretl but i can't get the same result.



    i write my try: the only thing i need for run my test id $[ER]RSS$



    but the second output of gretl gave me the S.E of Regression, so $S=3.11144$



    since i know that the estimate of Variance of regression is $S^2=frac[ER]RSST-k$



    $T-k=5-3$



    so i solved and obtained



    $[ER]RSS=19.36211$



    so the F-stat:



    $F=frac19.36211-6.251*frac5-36.25=4.1958$



    this is different from gretl output! of $F=7.29383$



    gretl seems to use a derivation of $S^2=fracRSST-k+1$ so if you solve for this you will obtain $[ER]RSS=29.043$ and obtain once again the F-stats you will get the same result $F=7.29383$



    My questions are:



    (1) where am i doing the test wrong?



    (2) how do i get by hand the same coefficients of the output in gretl? i mean $beta2=1.59549=beta3$?



    Thank You







    share|cite|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I did an F-test on a very simple linear regression model for test if the two coefficients have the same effect on the dependent variable y:



      i will call this below Original Regression :



      $y_t=hatbeta_1+hatbeta_2x_2+hatbeta_3x_3$



      and this is the output in gretl of my regression



      enter image description here



      this is the main idea of what i'm testing:



      $H0: beta_2=beta_3$



      $H1: beta_2neqbeta_3$



      my professor told that for run this type of test i have to rearrange my model in an



      Equivalent Regression:



      $y_t=hatbeta_1+(hatbeta_2-hatbeta_3)x_2+hatbeta_3(x_2+x_3)$



      so now i can express the equivalent hypothesis sistem:



      $H0: beta_2-beta_3=0$



      $H1: beta_2-beta_3neq0$



      the F-statistics:



      $F=frac[ER]RSS-[OR]RSSm*fracT-k[OR]RSS$



      $m$ are the restrictions: in this case $m=1$



      so now i have an output of gretl about my test



      enter image description here



      from this point on i tried to get the same result of the test in gretl but i can't get the same result.



      i write my try: the only thing i need for run my test id $[ER]RSS$



      but the second output of gretl gave me the S.E of Regression, so $S=3.11144$



      since i know that the estimate of Variance of regression is $S^2=frac[ER]RSST-k$



      $T-k=5-3$



      so i solved and obtained



      $[ER]RSS=19.36211$



      so the F-stat:



      $F=frac19.36211-6.251*frac5-36.25=4.1958$



      this is different from gretl output! of $F=7.29383$



      gretl seems to use a derivation of $S^2=fracRSST-k+1$ so if you solve for this you will obtain $[ER]RSS=29.043$ and obtain once again the F-stats you will get the same result $F=7.29383$



      My questions are:



      (1) where am i doing the test wrong?



      (2) how do i get by hand the same coefficients of the output in gretl? i mean $beta2=1.59549=beta3$?



      Thank You







      share|cite|improve this question












      I did an F-test on a very simple linear regression model for test if the two coefficients have the same effect on the dependent variable y:



      i will call this below Original Regression :



      $y_t=hatbeta_1+hatbeta_2x_2+hatbeta_3x_3$



      and this is the output in gretl of my regression



      enter image description here



      this is the main idea of what i'm testing:



      $H0: beta_2=beta_3$



      $H1: beta_2neqbeta_3$



      my professor told that for run this type of test i have to rearrange my model in an



      Equivalent Regression:



      $y_t=hatbeta_1+(hatbeta_2-hatbeta_3)x_2+hatbeta_3(x_2+x_3)$



      so now i can express the equivalent hypothesis sistem:



      $H0: beta_2-beta_3=0$



      $H1: beta_2-beta_3neq0$



      the F-statistics:



      $F=frac[ER]RSS-[OR]RSSm*fracT-k[OR]RSS$



      $m$ are the restrictions: in this case $m=1$



      so now i have an output of gretl about my test



      enter image description here



      from this point on i tried to get the same result of the test in gretl but i can't get the same result.



      i write my try: the only thing i need for run my test id $[ER]RSS$



      but the second output of gretl gave me the S.E of Regression, so $S=3.11144$



      since i know that the estimate of Variance of regression is $S^2=frac[ER]RSST-k$



      $T-k=5-3$



      so i solved and obtained



      $[ER]RSS=19.36211$



      so the F-stat:



      $F=frac19.36211-6.251*frac5-36.25=4.1958$



      this is different from gretl output! of $F=7.29383$



      gretl seems to use a derivation of $S^2=fracRSST-k+1$ so if you solve for this you will obtain $[ER]RSS=29.043$ and obtain once again the F-stats you will get the same result $F=7.29383$



      My questions are:



      (1) where am i doing the test wrong?



      (2) how do i get by hand the same coefficients of the output in gretl? i mean $beta2=1.59549=beta3$?



      Thank You









      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Aug 17 at 0:30









      Carlo

      175




      175




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          I hope that I understand your questions correctly..



          1. The most frequently used estimator of variance if the unbiased estimator, i.e.,
            $$
            S^2_epsilon = fracsum_i=1^T(y_i - haty_i)^2T-k,
            $$
            where $k$ is the number of estimated coefficients including the intercept. I.e., in a model like $y = alpha_0 + alpha_1 x_1 + alpha_2 x_2$, $k=3$.


          2. If your hypothesis is $H_0: beta_2 = beta_3$, then you can re-express the original model $y = beta_1 + beta_2 x_1 + beta_3 x_2 $ as
            $$
            y = beta_1 + beta_2x_1 + beta_2 x_2 = beta_1 +beta_2(x_1 + x_2)=beta_1+beta_2x^*,
            $$
            namely, you are estimating $beta_2$ which is the coeff. of $x^*$. I.e., you can use the OLS
            $$
            hatbeta_2=fracsum_i=1^T(y_i - bary_n)(x_i - barx_n)sum_i=1^n(x_i - barx_n)^2,
            $$
            where in the restricted model will be both the coeff. of $x_1$ and $x_2$.






          share|cite|improve this answer




















            Your Answer




            StackExchange.ifUsing("editor", function ()
            return StackExchange.using("mathjaxEditing", function ()
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            );
            );
            , "mathjax-editing");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "69"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2885290%2flinear-constraints-in-regression-model-self-study%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            I hope that I understand your questions correctly..



            1. The most frequently used estimator of variance if the unbiased estimator, i.e.,
              $$
              S^2_epsilon = fracsum_i=1^T(y_i - haty_i)^2T-k,
              $$
              where $k$ is the number of estimated coefficients including the intercept. I.e., in a model like $y = alpha_0 + alpha_1 x_1 + alpha_2 x_2$, $k=3$.


            2. If your hypothesis is $H_0: beta_2 = beta_3$, then you can re-express the original model $y = beta_1 + beta_2 x_1 + beta_3 x_2 $ as
              $$
              y = beta_1 + beta_2x_1 + beta_2 x_2 = beta_1 +beta_2(x_1 + x_2)=beta_1+beta_2x^*,
              $$
              namely, you are estimating $beta_2$ which is the coeff. of $x^*$. I.e., you can use the OLS
              $$
              hatbeta_2=fracsum_i=1^T(y_i - bary_n)(x_i - barx_n)sum_i=1^n(x_i - barx_n)^2,
              $$
              where in the restricted model will be both the coeff. of $x_1$ and $x_2$.






            share|cite|improve this answer
























              up vote
              0
              down vote













              I hope that I understand your questions correctly..



              1. The most frequently used estimator of variance if the unbiased estimator, i.e.,
                $$
                S^2_epsilon = fracsum_i=1^T(y_i - haty_i)^2T-k,
                $$
                where $k$ is the number of estimated coefficients including the intercept. I.e., in a model like $y = alpha_0 + alpha_1 x_1 + alpha_2 x_2$, $k=3$.


              2. If your hypothesis is $H_0: beta_2 = beta_3$, then you can re-express the original model $y = beta_1 + beta_2 x_1 + beta_3 x_2 $ as
                $$
                y = beta_1 + beta_2x_1 + beta_2 x_2 = beta_1 +beta_2(x_1 + x_2)=beta_1+beta_2x^*,
                $$
                namely, you are estimating $beta_2$ which is the coeff. of $x^*$. I.e., you can use the OLS
                $$
                hatbeta_2=fracsum_i=1^T(y_i - bary_n)(x_i - barx_n)sum_i=1^n(x_i - barx_n)^2,
                $$
                where in the restricted model will be both the coeff. of $x_1$ and $x_2$.






              share|cite|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                I hope that I understand your questions correctly..



                1. The most frequently used estimator of variance if the unbiased estimator, i.e.,
                  $$
                  S^2_epsilon = fracsum_i=1^T(y_i - haty_i)^2T-k,
                  $$
                  where $k$ is the number of estimated coefficients including the intercept. I.e., in a model like $y = alpha_0 + alpha_1 x_1 + alpha_2 x_2$, $k=3$.


                2. If your hypothesis is $H_0: beta_2 = beta_3$, then you can re-express the original model $y = beta_1 + beta_2 x_1 + beta_3 x_2 $ as
                  $$
                  y = beta_1 + beta_2x_1 + beta_2 x_2 = beta_1 +beta_2(x_1 + x_2)=beta_1+beta_2x^*,
                  $$
                  namely, you are estimating $beta_2$ which is the coeff. of $x^*$. I.e., you can use the OLS
                  $$
                  hatbeta_2=fracsum_i=1^T(y_i - bary_n)(x_i - barx_n)sum_i=1^n(x_i - barx_n)^2,
                  $$
                  where in the restricted model will be both the coeff. of $x_1$ and $x_2$.






                share|cite|improve this answer












                I hope that I understand your questions correctly..



                1. The most frequently used estimator of variance if the unbiased estimator, i.e.,
                  $$
                  S^2_epsilon = fracsum_i=1^T(y_i - haty_i)^2T-k,
                  $$
                  where $k$ is the number of estimated coefficients including the intercept. I.e., in a model like $y = alpha_0 + alpha_1 x_1 + alpha_2 x_2$, $k=3$.


                2. If your hypothesis is $H_0: beta_2 = beta_3$, then you can re-express the original model $y = beta_1 + beta_2 x_1 + beta_3 x_2 $ as
                  $$
                  y = beta_1 + beta_2x_1 + beta_2 x_2 = beta_1 +beta_2(x_1 + x_2)=beta_1+beta_2x^*,
                  $$
                  namely, you are estimating $beta_2$ which is the coeff. of $x^*$. I.e., you can use the OLS
                  $$
                  hatbeta_2=fracsum_i=1^T(y_i - bary_n)(x_i - barx_n)sum_i=1^n(x_i - barx_n)^2,
                  $$
                  where in the restricted model will be both the coeff. of $x_1$ and $x_2$.







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Aug 17 at 11:19









                V. Vancak

                9,9502926




                9,9502926






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2885290%2flinear-constraints-in-regression-model-self-study%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    這個網誌中的熱門文章

                    tkz-euclide: tkzDrawCircle[R] not working

                    How to combine Bézier curves to a surface?

                    1st Magritte Awards