Announcement

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

  • carryforward

    hi statalist--

    i am having issues with the carryfoward package. hoping someone will be able to help out. I am trying to carry forward values of wages in my data by the variable EMP_STATUS_. My code looks like this:

    bys PUBID EMP_STATUS_: carryforward CV_HRLY_, gen(test_wage)

    there isn't any error presented, but it doesnt seem that carryforward is working properly (see attached photo). as you'll see, there are CV_HRLY_WAGE entries that are not carried forward even when the same EMP_STATUS_ is used.
    Click image for larger version

Name:	Screen Shot 2019-04-21 at 3.06.19 PM.png
Views:	1
Size:	468.6 KB
ID:	1494396


  • #2
    Please read the FAQ. There you’ll find how to share data/command/output in the Stata Forum.

    That being said, I fail to understand your point. In short, at least in the screen of my smartphone, there is no missing data, hence there is no case where to insert ‘carried-forward’ values. Moreover, the variable CV_hourly seems to be mistakenly turned into a categorical variable. Hopefully that helps.
    Last edited by Marcos Almeida; 21 Apr 2019, 17:22.
    Best regards,

    Marcos

    Comment


    • #3
      Click image for larger version

Name:	image_14179.png
Views:	1
Size:	358.8 KB
ID:	1494406 sorry about that, i meant to attach this photo:

      as you can see, once 2000 begins, the individual is still reporting 199902 as EMP_STAUTS_, but the wage isn't being carried forward from 1999.
      Last edited by Rebecca Sansale; 21 Apr 2019, 18:00.

      Comment


      • #4
        I believe the comments in #2 still apply to the query.

        Also, I assume you haven’t read the FAQ so far.
        Best regards,

        Marcos

        Comment


        • #5
          To expand on the gentle hints of Marcos Almeida:

          carryforward is from SSC, as you are asked to explain (FAQ Advice #12). It's not obvious that you need it: compare the discussion from first principles at https://www.stata.com/support/faqs/d...issing-values/

          Screenshots aren't as helpful as you hope (FAQ Advice #12).

          However, a twist is that your variables EMP_STATUS_ and CV_HRLY_ are numeric variables with value labels. That seems wrong for a variable representing wage and while it's entirely plausible for a variable representing status, the value labels don't seem informative.

          Here's that FAQ link https://www.statalist.org/forums/help#stata for reading and acting on.

          Comment

          Working...
          X