hi everyone! I have a small dataset of perceptions, likert scale. the thing is some answer are "na" meaning for do not apply. I want to encode this variables as missing but I get a type mismatch. Here is my code: foreach x of varlist s1p3 s1p6 s2p1 s3p6 s3p8 s3p11 s4p3 s4p5 s4p7 s5p* s6p1 s6p3 s6p4 s6p5 s6p6 s6p7 s6p8 s6p9 s6 > p10 s6p11 s6p12 s6p13 { 2. replace `x'="" if `x'=="NA" | `x'=="n/a" | `x'=="Pend" | `x'=="N/A" 3. destring `x', replace 4. } (1 real change made) s1p3 has all characters numeric; replaced as byte (1 missing value generated) (1 real change made) s1p6 has all characters numeric; replaced as byte (1 missing value generated) I would very much appreciate any help
-
Login or Register
- Log in with
Comment