Am 03.01.2019 um 11:47 schrieb Sven Schreiber:
Am 03.01.2019 um 11:33 schrieb Schaff, Frederik:
For example, country names are changed to numerical factors. I cannot
find this information in the new Gretl data-set. From the log, this
corresponds to:
> A minimum working example:
> You may try with the following Data Set from Gesis:
> (ZA3778: EVS - European Values Study 1999 -
Germany)https://dbk.gesis.org/dbksearch/download.asp?db=E&id=50392
Sounds like an interesting example, but the link isn't open. Could you
post some excerpt perhaps?
thanks,
(Frederik sent me the file off-list in the meantime.)
OK, I see what you mean. However, it seems to me that the variables that
you are referring to aren't really string series in the Stata source
file. Notice the double explanation in gretl's string table at the top
-- first it says "at least one non-numeric variable", then it says
"furthermore some mappings from numerical values to labels were found
which are printed below" [re-translated from German here].
Now, if you look at the variable called "version", gretl reports a
"String/Code" table and that works alright, as you've said already. (In
German: "Zeichenketten / Code -Tabelle")
BUT: For variable "caseno" gretl reports something else in English
(perhaps this string isn't marked for translation yet in the sources):
"Value -> label mappings". For example -5 is mapped to 'other
missing'.
Actually, it happens that these codes never really appear as values in
this series, but this is just a special case I think.
So I believe the original series is numeric in Stata's file, and that's
why it is imported as numeric. Stata itself would use the value/label
mappings to display the values' string codes I guess.
If I'm correct, in the end your question then seems to be a (valid)
feature request: On importing Stata files with value/label mappings, can
this meta information be retrieved somehow in a structured way. But it
doesn't have to do with string-valued series I think.
Let's see what Allin has to say about that, but in general I suggest to
file a ticket on the feature request tracker. Right now I don't have a
solution with gretl. Perhaps there exist some other tools to query the
meta information of a Stata data file.
cheers,
sven