Announcement

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

  • local polynomial smoothed function in version 15.1 and 16.1

    Hi All,

    I generated attached plot using local polynomial smoothed function in version 15.1 and submitted for publication it was quiet smooth, and now I have version 16.1 when I was trying to make some changes as per reviewer comment and used the same data and code so noticed that smoothing pattern was slightly different.

    Is there any way to use version 16.1 and get a same plot generated using version 15.1.

    Any help will be appreciated.

    Thanks,
    Muhammad
    Attached Files
    0
    twoway polynomial smoothed function
    0%
    0
    Different plot version in 15.1 vs 16.1
    0%
    0

  • #2
    If you are absolutely certain that the data have not changed (it does look like the unsmoothed plot is the same in both versions, so probably the data are the same), try using version control. You don't show the command you used to create these plots, but just put version 15.1: in front of it. Unlesss the changes that have been made by Stata were done specifically to fix errors, this will probably cause Stata to create the plot the way it was done back in version 15.1. See -help version- for more information.

    If that doesn't work, then I think your only option is to find somebody who is still using version 15.1 and ask them to run the code for you.

    Comment


    • #3
      Hi Clyde,

      Thank you so much for you response, yes the data is exactly same. Here is the command I used to generated this plot, I also tried by writing version 15.1 but getting "invalid syntax" error.

      twoway ///
      (lpolyci haz_2000 cage, clcolor(maroon) fcolor(maroon%25) blcolor(white) blwidth(none) lwidth(medthick) clpattern(longdash)) ///
      (lpolyci haz_2006 cage, clcolor(forest_green) fcolor(forest_green%25) blcolor(white) blwidth(none) lwidth(medthick) clpattern(solid)) ///
      (lpolyci haz_2011 cage, clcolor(purple) fcolor(purple%25) blcolor(white) blwidth(none) lwidth(medthick)) ///
      (lpolyci haz_2016 cage, clcolor(mint) fcolor(mint%25) blcolor(white) blwidth(none) lwidth(medthick)) ///
      (connect haz_afro age_afro, clcolor(orange) lwidth(medthick) msymbol(square) msize(medsmall) mcolor(orange)), ///
      ytitle(Predicted HAZ Score) ylabel(-3(.5)0, angle(horizontal) format(%9.1f)) xtitle(Child's age (in months)) title("") xlabel(0(5)60) legend(rows(5) size(vsmall) keygap(1) symxsize(7) symysize(2) region(lcolor(white)) position(1) ring(0)) graphregion(fcolor(white))

      Finally I got someone who had version 15.1 so I was able to generate the same plot.

      is version 15.1 has to write before twoway?

      version 15.1 twoway //

      Thanks,
      Muhammad

      Comment


      • #4
        you can either put the version command on its own line in a do file or, if you only want it for specific commands, use as you show but put a colon after the "15.1"; see
        Code:
        help version
        note that I am just repeating what Clyde said in #2 above

        Comment


        • #5
          is version 15.1 has to write before twoway?

          version 15.1 twoway //
          You would write:
          Code:
          version 15.1: twoway
          to run -twoway- under version control in Stata 16. The colon ( : ) is required. This trick sometimes work and sometimes doesn't.

          Added: Crossed with #4.

          Comment


          • #6
            Thank you Clyde and Rich,

            Version 15.1: didn't work but tried to found someone who has version 15.1 so able to generate the same pattern of plot which was submitted previously.

            Thanks you so much for your support.

            Best regards,
            Muhammad

            Comment


            • #7
              Did you play with the Kernel or Bandwidth? New one looks more heavily smoothed, so I'd start with bandwidth.

              Comment


              • #8
                Yes George,

                Even I tried different Kernel function, Bandwidth and also to change # of points at which smooth is to be evaluated but didn't work for me.

                Thanks,
                Muhammad

                Comment

                Working...
                X