Announcement

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

  • Recoding a variable

    Hello,

    I need to recode a variable named bqbitchyeyes from hsn 1004 to 2665. I'm using the following command for this-

    recode bqbitchyeyes (.=0) (0=0) (1=1) if hsn<=2665, gen( bqbitchyeyes_new)
    However, this command seems to have some error, as it is showing type mismatch. Can someone please help me to solve the problem? Thanks.

    Fahmida

  • #2
    it sounds like bqbitchyeyes is a string variable; please show the result of
    Code:
    d bqbitchyeyes
    or it may be that hsn is a string variable in which case you need to surround the 2665 with double quote marks

    Comment

    Working...
    X