Announcement

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

  • Diagnostics tests for IV regression with clustered robust standard errors and weight

    ivregress 2sls Vaccination status (Education=instrument) i.cocuk12 i.Age_F_Effct i.news116a i.Parents_Edc urban [aw=weight], nocon vce (cluster province)


    How can i test the regression diagnostics after running the above clustered and weighted IV regression?

    After running the above regression, most of the options inside the report and statistics section of stata inside the psot esitmation does not work. the only thing works is the estimation of first stage option.

    But i need to test for weakness of the instrument and for the other diagnostic tests, I tried ivreg2 but it does not work for clustered and weighted data.

    Could you please help me with this?

    Kind Regards,

    Mustafa

  • #2
    Even after exluding weight and cluster option from the model, estimation with ivreg2 does not work. the warning i got is "the command does not work with factor variables"

    Comment


    • #3
      Mustafa - ivreg2 does indeed work with cluster and weights. What it doesn't do yet (but will very soon) is work with factor variables. A short term fix is to use the xi: prefix before the ivreg2 command. This will create the old-fashioned factor variables (names starting with "_I" etc.) which the current version of ivreg2 can work with.

      Comment


      • #4
        Dear Mark,

        I have used the following command but it did not work. And it is the final version of ivreg2.
        xi: ivreg29 H7 (C_of_W_Edc=Y_2008) i.cocuk12 i.Age_F_Effct i.news116a i.P_Edc kent [aw=v005], nocon vce (cluster s119b)

        Comment


        • #5
          "Does not work" is a phrase strongly deprecated in the Forum FAQ. Instead, you are enjoined to show exactly what you typed into Stata, and exactly what you got back. Use CODE delimiters to report this material (as explained in the FAQ). It'd also be a good idea to report the results of which ivreg2 to substantiate your statement about the version of ivreg2 that you have. Thanks

          Comment


          • #6
            Dear Statalist,

            The below regression is run by using both ivreg2 and ivreg29 codes. Stata11.2 is used to run the regression.

            Code:


            xi: ivreg29 dependent variable (Education=Instrument) i.region of childhood i.Age_Fixed_Effect i.Parents_Edc [aw=weight], nocon vce (cluster province)

            The warning given by stata11.2 is option vce() not allowed .

            When vce deleted:

            Code:


            xi: ivreg29 dependent variable (Education=Instrument) i.region i.Age_Fixed_Effect i.Parents_Edc [aw=v005], nocon (cluster province)


            Then, the warning given by Stata 11.2 is option nocon() incorrectly specified.


            Then, nocon was deleted.


            Code:

            xi: ivreg29 dependent variable (Education=Instrument) i.region i.Age_Fixed_Effect i.Parents_Edc [aw=v005], cluster (province)


            Then, the warning given by Stata 11.2 is unrecognized command: ranktest


            Could you please give me an advice related to how to correct the codes?

            Thank you in advance,

            Kind Regards,

            Mustafa Ozer
            Last edited by Mustafa Ozer; 14 Apr 2015, 12:57.

            Comment


            • #7
              Dear statalist,

              Code:

              xi: ivreg2 dependent variable (Education=Instrument) i.region i.Age_Fixed_Effect i.Parents_Edc [aw=v005], cluster (province)

              the above regression is again run by Stata11.2 . This time the program asked me to instal "
              ssc install ranktest". After installing it, fortunately the estimation
              and related statistics are given.

              Thank you,

              Kind Regards

              Comment


              • #8
                I don't have further comments for you (and am glad you have some results now) but please note for the future regarding the use of CODE delimiters what the FAQ Section 12 states:

                Stata code (i.e. the exact commands issued) is very much easier to read if presented as such. Click on the “Toggle Advanced Editor” button (an underlined A) in the area above where you enter text for posts and, in the menu that appears, click on the # button to insert ["CODE] and ["/CODE] mark-up. Write your code between, paying particular attention to linebreaks and indentation. Or just insert those mark-ups manually before, or indeed after, you insert your code.

                Examples of your data (or of realistic similar datasets) are also much easier to read if presented as CODE, e.g. of the instructions for an input command or of the output of a list command.


                What is valuable with presenting code or data as CODE is that other members can easily copy and paste what you post to play with in their Stata installation.

                Comment


                • #9
                  Thank you dear Stephen,

                  I will post according to your advice.

                  Have a good day.

                  Comment

                  Working...
                  X