Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Stata 13 wishlist


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Stata 13 wishlist
Date   Sun, 20 Jan 2013 11:58:23 +0000

I don't think "extended missing values for string variables" could be
supported in the existing framework at all. Or rather I would be
interested to see Bert's explanation of how they would work. Even if
value labels were introduced for string variables, you could not have
different value labels for "". Nevertheless it is also easy to
introduce your own conventions, such as

"<did not reply>"
"<not applicable>"

As above, I understand that strings could be empty for different
reasons -- but then as William indicates, the Stata solution is to
switch to numeric variables with value labels.

-estpost- and -esttab- are user-written programs (SSC, SJ). Please
remember to explain where user-written programs you refer to come
from.

Nick

On Sun, Jan 20, 2013 at 2:57 AM, William Buchanan
<william@williambuchanan.net> wrote:

> replace A=.a if A==.
> la def mis .a "Missing"
> la val A mis
>
> Your initial post also asked for "extended missing values for string variables." In which case, you replace them with the appropriate string, or you encode the variable and label the missing values that way.  If you mean something else, maybe you could provide an example.
>
> In some instances . means the data is missing, while other times it could represent data that was not applicable for the particular observation.  Since many people have likely come across data that did not have well defined missing variables, how does this solution help them?
>
> If the entire reason for generating a label for system missing values is to save a single optional argument in a user-written package that not all users use, I see little reason for StataCorp to invest their time and money to solve a "problem" that could just as easily be addressed by the end user.  You could also write a program to do this for you if you really wanted.

On Jan 19, 2013, at 18:37, Bert Lloyd <bert.lloyd.89@gmail.com> wrote:
>
>> On Sat, Jan 19, 2013 at 7:45 PM, William Buchanan
>> <william@williambuchanan.net> wrote:
>>> I'm not sure what value is gained from labeling missing values when there is no indication why the values are
>>> missing to begin with. If you know why specific values are missing then just use the extended missing values
>>> and label away.
>>
>> Here is one example:
>>
>> Suppose there are .-values in variable A.
>>
>> estpost tabulate A B, mi
>> esttab using whatever.tex, booktabs replace ///
>>  unstack label
>>
>> The problem is that esttab exports "_missing_", which causes problems
>> in latex. One can substitute("_missing_" "Missing") but it would be
>> more straightforward if .-values were labeled properly from the start.
>>
>>> If you're concerned about missing string values you could just replace the missing value with whatever you
>>> planned to label it as.
>>
>> But then they wouldn't be missing.

On Jan 19, 2013, at 15:24, Bert Lloyd <bert.lloyd.89@gmail.com> wrote:

>>>> Allow a value label for . (sysmiss, numeric missing value).
>>>>
>>>> Extended missing values for string variables.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index