[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Viktor Slavtchev <viktor.slavtchev@uni-jena.de> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: dirifit |

Date |
Thu, 06 Mar 2008 14:59:40 +0100 |

Dear Nick, first of all thank you very much for your kind response. Nick Cox wrote:

First question last. -dirifit- tries, among other things, to ignoreIndeed, I do have a lot of cases where individuals spend some time on a particular activity, while do not consider other possibilities at all.

observations in which any response is 0 or 1.

Viktor Slavtchev wrote:

I want to explain the share of time that individuals spent on five

distinct

alternatives (y1 - y5). Hence y1+y2+y3+y4+y5=1.

Therefore I run:

dirifit y1-y5, mu(x1 x2)

It works, however, for only 60 cases out of more than 500. That is, the

estimation is done for 60 cases.

Could it be that the -float- character of the dependent variable causes

that

problem? I am just wondering whether the possibility exists that the sum

of y

(=y1+y2+y3+y4+y5) becomes slightly lower or slightly larger than one

when the

dependent is -float-.

-dirifit- can be estimated only if the sum is one.

Is there a possibility to transform the variables in the way that 0.2534

is

exactly 0.2534 and not 0.253(3)9 or 0.2534(0)1?

Hence, there are a lot of cases where at least one of the y's is 0 as well as cases where only one of the y's is 1. If I've got you correctly, -dirifit- ignores such cases.

This issue is actually stated in the help for -dirifit-:

"Note that cases will be ignored if the one or more of the dependent variables has a value less than or equal to zero or more than or equal to one or if the dependent variables don't add up to one."

So I really apologise for my ignorance.

Indeed, in only 60 cases (of 391) none of the y's is 0 or 1:

. count if y1!=0 & y2!=0 & y3!=0 & y4!=0 & y5!=0

60

Exactly these have been used for estimation:

. dirifit y1 - y5

<output skipped>

. gen dum1=1 if e(sample)

(331 missing values generated)

. gen dum2=1 if y1!=0 & y2!=0 & y3!=0 & y4!=0 & y5!=0

(331 missing values generated)

. gen diff=dum1-dum2

(331 missing values generated)

. tab diff

diff | Freq. Percent Cum.

------------+-----------------------------------

0 | 60 100.00 100.00

------------+-----------------------------------

Total | 60 100.00

*So the question would be, how to proceed when at least one of the responses is allowed to be 0, but the model is not really a model of competing alternatives (-mlogit-)?

Kind regards

Viktor

*

* 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/

**Follow-Ups**:**st: RE: dirifit***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: dirifit***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**References**:**Re: st: dirifit***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**Re: st: dirifit***From:*"viktor.slavtchev@uni-jena.de" <viktor.slavtchev@uni-jena.de>

**RE: st: dirifit***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**Re: st: querying format for programming** - Next by Date:
**st: Semi-bug** - Previous by thread:
**RE: st: dirifit** - Next by thread:
**Re: st: dirifit** - Index(es):

© Copyright 1996–2019 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |