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: Pseudo R2 after "mi estimate:logit"


From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: Pseudo R2 after "mi estimate:logit"
Date   Mon, 14 Mar 2011 16:26:11 -0400

Aggie,

responses interleaved:

On 3/14/11 4:12 PM, Aggie Chidlow wrote:
> Hi (again) Rich,
> 
> My do-file is:
> 
> mi set mlong
> mi query
> mi describe
> mi misstable sum
> generate lnx = cond(x==0, mindouble(), log(x3))
> mi register imputed lnx
> set seed 29390
> mi describe
> mi impute mvn lnx = x1 x2 x3 x4 x5 x6 x7,add(30)
> mi estimate: logit x1 x2 x3 x4 x5 x6 x7 lnx
> mi xeq 0 1 30: logit x1 x2 x3 x4 x5 x6 x7 lnx
> 
> For example from "mi xeq 30:logit x1 x2 x3 x4 x5 x6 x7 lnx" I can see
> Wald test.However, from "mi estimate: logit x1 x2 x3 x4 x5 x6 x7 lnx"
> I can only see F test. So, how can I get Wald test from "mi estimate:
> logit"?

I'm still not sure what Wald test you are referring to; when I do
something similar to what you did, I see that for the individual data
sets I get log-likelihood and log-likelihood chi-squared (but not F) and
when I do -mi estimate" I get F but neither of the above; are you
looking for one (or more of these)

however, the combination that -mi estimate- gives is not a likelihood
based result and so I would not expect to see log-likelihood info after
-mi estimate-

> Further, how do I know that 30 imputations (M=30) is the adequate
> number? I am asking because according to Rubin (1987) only 3-10
> imputations may be needed?

Clearly I am not familiar with your data or your specific question of
interest; I never use as few as 10; there is quite a bit of literature;
one place to start is White, IR, Royston, P and Wood, AM (2011),
"Multiple imputation using chained equations: issues and guidance for
practice," _Statistics in Medicine_, 30: 377-399 and the citations in there

Rich

> On Mon, Mar 14, 2011 at 6:07 PM, Richard Goldstein
> <[email protected]> wrote:
>> Aggie,
>>
>> 1. I don't understand what you are saying, or seeing, re: Wald tests --
>> and you aren't sending your code/commands
>>
>> 2. I do not see the exact definition that Stata is using for the F-test
>> in -mi estimate: logit ..."; I suggest you send an email to tech support
>> ([email protected])
>>
>> 3. I have never used -mi add-
>>
>> Rich
>>
>> On 3/14/11 1:48 PM, Aggie Chidlow wrote:
>>> Thank you Rich,
>>>
>>> As I am new to "mi estimate" and trying to learn it, I am getting a
>>> bit confused when looking at my outputs..so appologies for any silly
>>> questions.
>>>
>>> I see the same when I look at the overall model using "mi estimate:logit".
>>> However when I look at "mi xeq 0 1 20" I can see Wald tests.
>>>
>>> Dose it mean that the F - test (for M) in "mi estimate:logit"
>>> represents Wald test from individual m?
>>>
>>> Further, how do I choose the appropriate M in add()?
>>>
>>>
>>> On Mon, Mar 14, 2011 at 3:00 PM, Richard Goldstein
>>> <[email protected]> wrote:
>>>> 1. next to each predictor I see a t-test
>>>>
>>>> 2. at the top of the output I see an F-test
>>>>
>>>> I still don't understand what Wald test you are looking for
>>>>
>>>> Rich
>>>>
>>>> On 3/14/11 10:06 AM, Aggie Chidlow wrote:
>>>>> The one for "mi estimate:logit" for over imputed data.
>>>>> I can see it for each M but can't see it for the whole model.
>>>>>
>>>>> So, can you tell me whare you are looking,please?
>>>>> Aggie
>>>>>
>>>>> On Mon, Mar 14, 2011 at 1:35 PM, Richard Goldstein
>>>>> <[email protected]> wrote:
>>>>>> What Wald test are you referring to? I certainly see them for the predictors
>>>>>>
>>>>>> Rich
>>>>>>
>>>>>> On 3/14/11 9:24 AM, Aggie Chidlow wrote:
>>>>>>> Thank you Rich,
>>>>>>>
>>>>>>> I got it now... I made a mistake in the "qui mi xeq 1/`M': ..." hence
>>>>>>> my results looked strange (to me).
>>>>>>>
>>>>>>> If I may...
>>>>>>> As I am used to reporting Wald test for the logit model.
>>>>>>> Looing at the results you do not get it by using "mi estimate: logit".
>>>>>>> Do you know how I can get it?
>>>>>>> Or is it not being reported in mi estimate:logit?
>>>>>>>
>>>>>>> On Mon, Mar 14, 2011 at 1:02 PM, Richard Goldstein
>>>>>>> <[email protected]> wrote:
>>>>>>>> as you can see from the code, I am collecting e(r2_p) and this is
>>>>>>>> pseudo-r-squared;
>>>>>>>>
>>>>>>>> I have no idea what you mean by "strange result", but you can look at
>>>>>>>> each regression by dropping the "qui" and displaying "e(r2_p)"
>>>>>>>>
>>>>>>>> Rich
>>>>>>>>
>>>>>>>> On 3/14/11 8:58 AM, Aggie Chidlow wrote:
>>>>>>>>> Hi Rich,
>>>>>>>>> Thank you for the do file.
>>>>>>>>> It is much appreciate.
>>>>>>>>>
>>>>>>>>> One more question, if you don't mind (soory if it a silly one).
>>>>>>>>>
>>>>>>>>> Is your scalar R2 or Pseudo-R2?
>>>>>>>>> I am asking because when following your do file with my (varlist) I
>>>>>>>>> get strange result for my Pseudo-R2.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Mar 14, 2011 at 12:36 PM, Richard Goldstein
>>>>>>>>> <[email protected]> wrote:
>>>>>>>>>> to the best of my knowledge, there is no similar wrapper; here is how I
>>>>>>>>>> have done it in the past, in a do file:
>>>>>>>>>>
>>>>>>>>>> 0. set up your right-hand-side variables (predictors) in a local; below,
>>>>>>>>>> mine is called `rhs'
>>>>>>>>>>
>>>>>>>>>> 1. noi estimate the model so you get result
>>>>>>>>>>
>>>>>>>>>> 2. then
>>>>>>>>>> qui mi query
>>>>>>>>>> local M=r(M)
>>>>>>>>>> scalar r2=0
>>>>>>>>>> scalar cstat=0
>>>>>>>>>> qui mi xeq 1/`M': logit acuteall `rhs'; scalar r2=r2+e(r2_p)
>>>>>>>>>> scalar r2=r2/`M'
>>>>>>>>>>
>>>>>>>>>> the "qui" on the mi xeq command is so that you don't see the logit for
>>>>>>>>>> each of your imputed data sets (note that "acuteall" is just the name of
>>>>>>>>>> my outcome variable in a particular do file; replace with the name of
>>>>>>>>>> your outcome variable)
>>>>>>>>>>
>>>>>>>>>> 3. then display the scalar or do whatever else you want with it
>>>>>>>>>>
>>>>>>>>>> Rich
>>>>>>>>>>
>>>>>>>>>> On 3/14/11 8:28 AM, Aggie Chidlow wrote:
>>>>>>>>>>> Thank you Rich,
>>>>>>>>>>>
>>>>>>>>>>> I am familiar with the information and procedure you suggested.
>>>>>>>>>>>
>>>>>>>>>>> Do you happen to know if there is (i.e. for mi estimate:logit) a
>>>>>>>>>>> similar wrapper as the mibeta for mi estimate:regress?
>>>>>>>>>>>
>>>>>>>>>>> Aggie
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Mar 14, 2011 at 12:17 PM, Richard Goldstein
>>>>>>>>>>> <[email protected]> wrote:
>>>>>>>>>>>> see the following faq:
>>>>>>>>>>>>
>>>>>>>>>>>> http://www.stata.com/support/faqs/stat/mi_combine.html
>>>>>>>>>>>>
>>>>>>>>>>>> note that if you are using the "nocons" option of logit, the
>>>>>>>>>>>> pseudo-r-squared is not saved and thus you can't obtain it
>>>>>>>>>>>>
>>>>>>>>>>>> Rich
>>>>>>>>>>>>
>>>>>>>>>>>> On 3/14/11 8:13 AM, Aggie Chidlow wrote:
>>>>>>>>>>>>> Dear Stata users,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Can somebody tell me how I could obtain the value of Pseudo R2 after
>>>>>>>>>>>>> "mi estimate:logit", please?
>>>>>>>>>>>>>
>>>>>>>>>>>>> I know about "mibeta" for "mi estimate:regress" but do not know (at
>>>>>>>>>>>>> present)  how to obtan R-squared measures from "mi estimate:logit".
>>>>>>>>>>>>>
>>>>>>>>>>>>> Many thanks in advance,
>>>>>>>>>>>>> Aggie
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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