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]

st: nlogit for single observation data using STATA 12


From   "Vahidnia, Farnaz" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: nlogit for single observation data using STATA 12
Date   Mon, 5 Aug 2013 21:34:38 +0000

Hello,

I am trying to fit a nested logit model to estimate OR of being an HIV case by gender for certain risk factors. I don't want to stratify be gender because most independent variables are shared between male and female, and I want to stratify only on variables related to sexual risk behavior. I only have one observation per subject and am using STATA 12.

The gender specific independent var in my data is sexual orientation (sexorientlife) with three levels: 1=Heterosexual, 2=homosexual and 3=bisexual
I created the tree structure using:

nlogitgen gender=male (male:1, female: 0)
nlogitgen sexorient=sexorientlife (hetero: 1, homo: 2 3)

My tree structure looks like this: 
tree structure specified for the nested logit model

gender  N       sexorient 	         N    k 
------------------------------------
male   1238 	--- hetero    1120 439
           		  +- homo       118 105
female 1202 	--- hetero    1098 368
              		+- homo       104  60
------------------------------------
                   	 total            2440 972

My dependent var is "hivcase", binary, 0 for controls 1 for cases. 
The model look like: 

. nlogit hivcase ageyear lowincome black multiplepartner || gender:   || sexorient:, case(study_number) noconstant

note: 1485 cases dropped because they have only one alternative
no cases remain after removing invalid observations

I guess the problem is that "nlogit requires only that hierarchy be maintained for all cases." Which is not true in my data, as a subject does not have a choice to multiple sexual orientations. 
In other words my choices are mutually exclusive. 
Another problem I guess is that IIA is a property is violated as the odds of choosing one alternative over another (sexual orientation) is not independent of the other alternatives.

I am thinking about considering gender as a group option, to make data look like 2 subjects with ~ 1200 observations per subject. 

I appreciate any help or comment. 
Thanks,


Farnaz 


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