Announcement

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

  • Problems with interaction

    ,Dear

    I am trying to perform xtabond2 using my dataset(below I provide link where you can download it), but I am getting one error.

    Exactly, when I perform next commands

    xtset idstate yyear
    bacon lnfdi, generate(out) percentile(10) replace
    xtabond2 lngini_dispv6 l.lngini_dispv6 c.ProsekEBDR##c.ProsekEBDR fh_ipolity2 tdummyeu lnfdi lnsstran growth if !out, gmm (l.lngini_dispv6 ProsekEBDR2 fh_ipolity2 lnsstran growth , lag (2 2) collapse) iv( lnfdi tdummyeu, eq(level)) robust noconst

    I get next error message:

    cProsekEBDR##c: operator invalid
    r(198); .

    Any ideas how to solve this?

    Thanks a lot in advance.

    Regards,

    Slaven

    On this link you can find dataset:

    https://drive.google.com/open?id=1pT..._gazgyss6uskQD

  • #2
    Slaven:
    welcome to this forum.
    It may well be that, being a bit old-fashioned, the community-contributed (as you are kindly requested to specify, for good reasons reported in the FAQ. Thanks) does not support -fvvarlist- notation.
    If prefixing your code with -xi:- does not do the trick, the only chance I see is to create the interaction by hand (and sadly giving in any help from -margins- and marginsplot- later).
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Carlo,

      My professor gave me this dataset, as well as .do file with code. On his computer code works, on my not. Don't know why.

      Comment


      • #4
        This code is so important for me.

        Comment


        • #5
          It works for me, too. What version of Stata do you have?

          Comment


          • #6
            14.2.

            Comment


            • #7
              Don't know what is happening. And why.

              Comment


              • #8
                Slaven:
                is your copy of Stata fully updated?
                Kind regards,
                Carlo
                (Stata 18.0 SE)

                Comment


                • #9
                  I hope. My professor downloaded Stata(where, I don't know) and gave me .rar file with distribution.

                  Comment


                  • #10
                    Slaven:
                    type
                    Code:
                    update all
                    and see what Stata gave you back.
                    Kind regards,
                    Carlo
                    (Stata 18.0 SE)

                    Comment


                    • #11
                      r(197): bad serial number

                      Not surprising, because I supposed that this is pirate version.

                      Comment


                      • #12
                        Really don't know what to do. I know that nobody will give me regular copy of Stata, but I don't have time to wait for regularly bought DVD.
                        Last edited by Slaven Savic; 29 Mar 2019, 07:36.

                        Comment


                        • #13
                          In the US at least, you can buy a 6 month student version for as little as $45. Further, you can electronically download.

                          https://www.stata.com/order/

                          You can also ask for an evaluation version:

                          https://www.stata.com/customer-service/evaluate-stata/

                          I know you don't control this, but your instructor really shouldn't give you Stata problems if you only have pirated software! Maybe see if there are legal versions around or ask your prof if you can use his/her machine.

                          I know not everybody has big software budgets, but there are freebie programs like R that could be used by the financially strapped.

                          Finally, as Carlo said, you could always do things the old fashioned way and generate the interaction term yourself.

                          -------------------------------------------
                          Richard Williams, Notre Dame Dept of Sociology
                          Stata Version: 17.0 MP (2 processor)

                          EMAIL: [email protected]
                          WWW: https://www3.nd.edu/~rwilliam

                          Comment

                          Working...
                          X