I will be out of the office from 9/20-9/24.
If you need assistance with ORMIS, please call the ORMIS pager at
410-434-0065.
Thanks,
>>> "[email protected]" 09/18/04 11:16 >>>
I have a problem in trying to convert an alpha character to real. I have
converted the data from spss to stata using stat transfer, but one of
the numeric variables has na positioned for all of the "na" measures. I
can see the actual values since when I run sum by a grouping command
they appear. I'm a bit rusty in stata now, and I do recall that I could
use the function real to convert the alpha characteris to their actual
numeric values. I cannot seem to get the real command to work.
Perhaps if there is someone out there who might recall this procedure, I
would be appreciative.
Here is what happens:
. tab hours
enter the |
number of |
hours |
written on |
the |
questionnai |
re in the |
space here. |
enter | Freq. Percent Cum.
------------+-----------------------------------
na | 1 25.00 25.00
na | 1 25.00 50.00
na | 1 25.00 75.00
na | 1 25.00 100.00
------------+-----------------------------------
Total | 4 100.00
when I try to convert these to real numbers it does this:
. real("hours")
unrecognized command: real
r(199);
I have been unable to find the real command in the handbooks, so I
thought I might ask more skilled persons here.
The actual numbers are these:
. sort secnum
. by secnum: sum hours
----------------------------------------------------------------------------------------------------------
-> secnum = 1 cathy
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
hours | 1 89 . 89 89
----------------------------------------------------------------------------------------------------------
-> secnum = 2 hassan
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
hours | 1 12 . 12 12
----------------------------------------------------------------------------------------------------------
-> secnum = 3 freddi
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
hours | 1 24 . 24 24
----------------------------------------------------------------------------------------------------------
-> secnum = 9
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
hours | 1 23 . 23 23
If anyone can show me what mistakes I'm making I will be in your debt.
Thanks
jon ebeling
csu, chico
.
*
* 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/
*
* 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/