Announcement

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

  • unexpected end of file: problems still related to stata programming

    Dear,

    Thank you for helping me. I encountered the following problem:


    local vv "srate infla ss*"

    . foreach v of varlist `vv'{
    2. local a: var label `v'
    3. if ("`v'"=="infla"|"`v'"=="srate"){
    4. winsor `v', p(0.02) gen(`v'_x)
    5. }
    6. else {
    7. winsor `v', p(0.01) gen(`v'_x)
    8. }
    9. drop `v'
    10. rename `v'_x `v'
    11. label var `v' "`a'"

    unexpected end of file
    r(612);


    end of do-file

    r(612);


    Best,

    Eddie

  • #2
    The closing brace of foreach is missing ...

    Comment

    Working...
    X