Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: How to cope with string when transfrom from Epidata to Stata


From   Jia Xiangping <jiajoseph@googlemail.com>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: How to cope with string when transfrom from Epidata to Stata
Date   Thu, 13 Oct 2005 21:26:30 +0800

Dear all,

When data were input from questionnaires, epidata (version3.1) was
used. One question, as "Did you applied credit last year", was set as
"Boolean (yes/no)" in Epidata. But when data was exported to Stata
8.2, the result is very frustrating:

-des v1, detail-

                        storage   display     value
variable name    type       format      label      variable label
-------------------------------------------------------------------------------
v1                      str1           %1s                 1) did you
apply for a credit
                                                                        in 2004

-sum v1, detail-

            1) did you apply for a credit in 2004
-------------------------------------------------------------
no observations

-list v1-

 +----+
     | v1 |
     |----|
  1. |  N |
  2. |  N |
  3. |  N |
  4. |  N |
  5. |  N |
     |----|
  6. |  N |
  7. |  N |
  8. |  N |
  9. |  N |
 10. |  N |
     |----|
 11. |  N |
 12. |  N |
 13. |  N |
 14. |  N |
 15. |  N

What I need is just a binary variable. Must I have to transform it to
numerical variable firstly and then label variables and values again
manually? Are there any other ways I can apply?

If I could foresee this problem, I would have defined variable v1 as
just numerical type in Epidata instead of "Boolean".


--
Xiangping JIA

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index