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

From |
"Martin Weiss" <martin.weiss@uni-tuebingen.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: question on cond( ) |

Date |
Fri, 29 Feb 2008 15:29:18 +0100 |

I could not post to the Statalist for a long time until I checked the FAQ carefully: you must use "plain text" for your postings which may not be the default in your mail program. It was only after that discovery that I could take advantage of the list :-) Martin Weiss _________________________________________________________________ Diplom-Kaufmann Martin Weiss Mohlstrasse 36 Room 415 72074 Tuebingen Germany Fon: 0049-7071-2978184 Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130 Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131 SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945 -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Jared Gross Sent: Friday, February 29, 2008 3:13 PM To: statalist@hsphsun2.harvard.edu Cc: n.j.cox@durham.ac.uk Subject: RE: st: question on cond( ) Dear Mr. Cox, I have tried to email the Stata list three times over the last two days and for some reason my message hasn't gotten through. I am emailing you because I've noticed that you are a frequent list poster and I'm hoping that you can either help me solve my Stata problem or forward my message to the list, where it can be read and answered by someone else. Thank you so much for your help! ---- Please forgive my basic question; relative to most users on this list, I'm not very familiar with Stata. I'm trying to use the nlogit command in Stata 10 to estimate a degenerate model of mergers and acquisitions. Unfortunately, I keep getting the error "no cases remain after removing invalid observations." Because I'm pretty sure I'm mis-specifying my model, and possibly don't have the cases right, I'm hoping someone here can help. My data looks like the following: Ticker Year Covariates GoesPrivate PublicTakeover Event ContinuesIndep A 1999 x 0 0 0 1 A 2000 x 0 1 1 0 B 1998 y 0 0 0 1 B 1999 z 0 0 0 1 B 2000 z 1 0 2 0 And the model I want to estimate is: Company either (1) has ContinuesIndependently == 1 OR (2) is subject to Event == 1 | Event == 2 If Event == 1 | Event == 2, then either (A) GoesPrivate == 1 OR (B) PublicTakeover == 1, so that I have a nested model in which the first logit determines whether a company continues in my data to the next year or exits through "Takeover" (i.e. Event == 1 | Event == 2); and then a second, degenerate stage in which the company, if Takeover == 1, either GoesPrivate == 1 or PublicTakeover == 1. How do I estimate this? I tried to use the following commands: egen id = group(ticker) nloitgen takeoverType = Event(Cont: 0, takeover: 1|2) nlogit GoesPrivate covariates || takeoverType: other_covariates, base(cont) ||, case(id) I think my problem may be coming stemming from my use of ticker as the case(id). Thank you so much for your help. Jared -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox Sent: Friday, February 29, 2008 6:11 AM To: statalist@hsphsun2.harvard.edu Subject: RE: st: question on cond( ) That's a dopey example of mine. If you want to map 1 -> 1, 2 -> 2, 3 -> 3, everything else -> 4, you can do it more concisely. The point is just to mention nesting. Nick Cox Your last question is about intention -- what was in the mind of the program designers -- and is perhaps best answered by StataCorp. Oddly enough, I've never used the four argument case that I can recall. Although some dislike the usage, nesting of -cond(,)- lets you handle four or more branches, and I find that more congenial, e.g. cond(x == 1, 1, cond(x == 2, 2, cond(x == 3, 3, 4))) Naturally there are many other ways to achieve similar results. .Nick n.j.cox@durham.ac.uk Visintainer, Paul Nick, Thanks for the coding suggestions. This is exactly what I was looking for--especially for the multiple variables. And, Nick (Winter), thanks for the explanation for cond(). One question: was it the intention of the 4-level cond() to code for missings or is there some other application for it? * * 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/ * * 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/ * * 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/

**References**:**st: question on cond( )***From:*"Visintainer, Paul" <PAUL_VISINTAINER@NYMC.EDU>

**Re: st: question on cond( )***From:*Nick Winter <nwinter@virginia.edu>

**RE: st: question on cond( )***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**RE: st: question on cond( )***From:*"Visintainer, Paul" <PAUL_VISINTAINER@NYMC.EDU>

**RE: st: question on cond( )***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**RE: st: question on cond( )***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**RE: st: question on cond( )***From:*"Jared Gross" <jgross@law.harvard.edu>

- Prev by Date:
**Re: st: -bs- with the xi: prefix and -gologit2-** - Next by Date:
**st: RE: QIC Program question to assess fit in xtgee** - Previous by thread:
**RE: st: question on cond( )** - Next by thread:
**st: Count Data again** - Index(es):

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