After having exported data from LimeSurvey into a binary .sav (SPSS) data file and importing the file into Stata with -import spss-, if I run the .ado-program -fre- (from SSC) to display a frequency table of a variable I receive the error message
(the command -tab1- produces no error). The variable type is byte, but if I list the values of that variable they are shown as
The format of the variable in the variable window is shown as "10.0g" (not as "%10.0g"!). After running the command
the -list- command displays the values as expected and -fre- runs without error:
Any idea why this happens and how to solve the issue (except the work-around of using -format- to avoid the problem)?
Code:
sprintf(): 3001 incorrect number of arguments
fre_sprintf(): - function returned error
fre_display_or_export(): - function returned error
<istmt>: - function returned error
Code:
. list lastpage if lastpage < 30
+----------+
| lastpage |
|----------|
21. | 0.0e+00 |
88. | 1.0e+00 |
95. | 1.0e+00 |
105. | 2.8e+01 |
120. | 0.0e+00 |
|----------|
146. | 1.0e+00 |
154. | 1.4e+01 |
155. | 1.3e+01 |
176. | -1.0e+00 |
209. | 0.0e+00 |
+----------+
Code:
format lastpage %10.0g
Code:
. list lastpage if lastpage < 30
+----------+
| lastpage |
|----------|
21. | 0 |
88. | 1 |
95. | 1 |
105. | 28 |
120. | 0 |
|----------|
146. | 1 |
154. | 14 |
155. | 13 |
176. | -1 |
209. | 0 |
+----------+
. fre lastpage if lastpage < 30
lastpage -- Letzte Seite
-----------------------------------------------------------
| Freq. Percent Valid Cum.
--------------+--------------------------------------------
Valid -1 | 1 10.00 10.00 10.00
0 | 3 30.00 30.00 40.00
1 | 3 30.00 30.00 70.00
13 | 1 10.00 10.00 80.00
14 | 1 10.00 10.00 90.00
28 | 1 10.00 10.00 100.00
Total | 10 100.00 100.00
-----------------------------------------------------------

Comment