Statalist The Stata Listserver


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

Re: st: nlogitrum and nlogit: unbalanced data


From   John Fulton <[email protected]>
To   [email protected]
Subject   Re: st: nlogitrum and nlogit: unbalanced data
Date   Wed, 10 Jan 2007 13:29:08 -0500

Thank you very much Richard.
I also noted the confusion with the "id" prefix variables in the code.
Not knowing what's really going on, I lacked the confidence to know which ones to rename.
John.



Richard Gates wrote:

John,

It looks like there is a bug in of -nlogitrum- when weights
are given. I am able to recreate the "weights" error that
you experienced (sorry for not using weights when I tried this).

Starting on line 102 of -nlogitrum- there is the following code

if "`weight'" != "" {
tempvar chkwght qui gen `chkwght' `exp' cap bysort id: assert `chkwght' == `chkwght'[1] if `touse'
if _rc {
dis as err /*
*/ "weights must be the same for all observations in a group"
exit 407
} local wgt `"[`weight'`exp']"' }

replace id to `newgp' in the bysort
cap bysort `newgp': assert `chkwght' == `chkwght'[1] if `touse'


Once I made this change the estimation completed.
If you have further problems, we can iron them out off of
statalist.
-Rich
[email protected]

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



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