Announcement

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

  • option / not allowed

    I run this prog. but it show : option / not allowed???
    clear* webuse lutkepohl2 var dln_inv dln_inc irf create irf1, set(irf1, replace) irf graph oirf, impulse(dln_inv) response(dln_inc) name(orig1,replace) var dln_inv dln_consump irf create irf2, set(irf2,replace) irf graph oirf, impulse(dln_inv) response(dln_consump) name(orig2, replace) use "irf2.irf",clear keep if impulse == "dln_inv" & response == "dln_consump" keep step oirf stdoirf gen upper_ci2 = oirf +1.96*stdoirf gen lower_ci2 = oirf - 1.96*stdoirf rename oirf oirf2 save irf2_data,replace use "irf1.irf" keep if impulse == "dln_inv" & response == "dln_inc" keep step oirf stdoirf gen upper_ci1= oirf +1.96*stdoirf gen lower_ci1 = oirf - 1.96*stdoirf rename oirf oirf1 merge 1:1 step using irf2_data twoway rarea upper_ci1 lower_ci1 step, color(blue%20) lwidth(vvthin) /// || line oirf1 step , lc(blue) /// || rarea upper_ci2 lower_ci2 step, color(green%20) lwidth(vvthin) /// || line oirf2 step , lc(green) /// ||, legend(pos(6) row(1) order(2 "IRF1-Income" 4 "IRF2-Consumption"))

  • #2
    Please use CODE delimiters as explained in the FAQ Advice.

    Comment


    • #3
      I will second Nick's request.

      Please, after 34 posts, take a few moments to review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. Note especially sections 9-12 on how to best pose your question. It's particularly helpful to copy commands and output from your Stata Results window and paste them into your Statalist post using code delimiters [CODE] and [/CODE], and to use the dataex command to provide sample data, as described in section 12 of the FAQ.

      The more you help others understand your problem, the more likely others are to be able to help you solve your problem.

      With that said, I would guess that the code in post #1 was copied from Stata's Do-file Editor and pasted into Stata's Command window. Continuation lines using /// are only allowed on commands run from the Do-file Editor, not on commands pasted into the Command window. Here's an example typed into the Command window that duplicates the problem.
      Code:
      . sysuse auto, ///
      option / not allowed
      r(198);
      
      .

      Comment


      • #4
        I am sorry for this inconvenience.

        The problem is not solved with:
        sysuse auto, /// Same response: option / not allowed. Can I convert the code in post #1 to be accepted directly in the Stata's Command window (without the appear of: option / not allowed). Many Thanks

        Comment


        • #5
          https://www.statalist.org/forums/for...-panel-var-irf

          Comment


          • #6
            I wrote in post #3

            Continuation lines using /// are only allowed on commands run from the Do-file Editor, not on commands pasted into the Command window.
            You wrote in post #4

            [QUOTE]Can I convert the code in post #1 to be accepted directly in the Stata's Command window/QUOTE]

            You would be better served by pasting the code linked to in post in post #5 into the Do-file Editor and running it from there. In general, that is the expectation of how code is run on Statalist, and when you seek advice on Statalist nobody will be assuming you are going to paste the code into the command window. I see no reason why you are not running the code you have copied from the Do-file Editor window as the author intended. I have just done that and it runs perfectly.

            But if you insist on copying the code from somewhere and pasting it into Stata's Command, you will need to remove all the line continuations and write each continued command as a single line. In this case, it means you need to change
            Code:
            twoway rarea upper_ci1 lower_ci1 step, color(blue%20) lwidth(vvthin)  /// 
                || line oirf1 step , lc(blue) /// 
                || rarea upper_ci2 lower_ci2 step, color(green%20) lwidth(vvthin)  /// 
                || line oirf2 step , lc(green) /// 
                ||, legend(pos(6) row(1) order(2 "IRF1-Income" 4 "IRF2-Consumption"))
            to the single line
            Code:
            twoway rarea upper_ci1 lower_ci1 step, color(blue%20) lwidth(vvthin) || line oirf1 step , lc(blue) || rarea upper_ci2 lower_ci2 step, color(green%20) lwidth(vvthin) || line oirf2 step , lc(green) ||, legend(pos(6) row(1) order(2 "IRF1-Income" 4 "IRF2-Consumption"))
            (which will perhaps be wrapped in your web browser because it is so long).

            Comment


            • #7
              Thank you very much,
              Problem fixed

              Comment


              • #8
                Please, I run the program into the Do-file Editor, as a result: the graph appears but without the line IRF orthogonalized?

                Comment


                • #9
                  I do not understand this new problem.

                  I run the code linked to from post #4 and get results identical to what is shown in the linked-to post.

                  Comment


                  • #10
                    The IRF 2 - consumption line is hidden by the first line (IRF1 - Income), how I can appear the two lines?

                    Comment


                    • #11
                      After I run the code this is what my Graph window looks like in Stata. We see that in the left margin there are three graphs shown; I have selected the third one, which shows the both IRF 2 and IRF 1.

                      Click image for larger version

Name:	irf.png
Views:	1
Size:	472.3 KB
ID:	1553584

                      Comment


                      • #12
                        I think because of the old version of my STATA.
                        I have a problem with a new graph (joined file). I need to reduce the Y-axis scale (to 0.01) in order to obtain a large graph. how I can do please?
                        Attached Files

                        Comment


                        • #13
                          Without knowing what you have done, it is very hard to suggest what you can do differently.

                          Your new problem with your graph is a long way from this topic "option / not allowed" and it is likely that many members proficient in Stata Graphics (I am not) have not been following this discussion.

                          You should return to the General Forum top page and post a new topic on this new question.

                          Before doing that, you should follow the guidance in post #3 above, as you are now up to 40 posts without having done so, or if so, without having heeded the instructions in the FAQ.

                          Comment


                          • #14

                            https://www.statalist.org/forums/help#version

                            11. What should I say about the version of Stata I use?

                            The current version of Stata is 16. Please specify if you are using an earlier version; otherwise, the answer to your question may refer to commands or features unavailable to you. Moreover, as bug fixes and new features are issued frequently by StataCorp, make sure that you update your Stata before posting a query, as your problem may already have been solved.


                            Comment

                            Working...
                            X