Hello,
Having a daft moment.
I surveyed 2006 respondents about cats. 1002 were Urban and 1004 rural.
I have two separate variables. The first asks whether, during a 7 year period, (out of all respondents) respondents domestically sourced cats *yes/no. The second asks if (out of all respondents) respondents imported cats *yes/no within the 7 year period.
Unfortunately, I didn't have one variable that asked if they ever domestically sourced or imported a cat.
When I cross tabulate the two variables, there are some respondents who imported and domestically sourced cats. So I want to make sure I don't over count in Q1 below.
Q1: Now, I want to see if there is a difference (using logistic regression) in IMPORTING (only) a cat based on whether a respondent lives in an urban or rural household.
I created a new variable, and to avoid said over-counting, used the following command
generate gotcat=.
replace gotcat=1 if (importcat == 1) & ( sourcecat == 0)
replace gotcat=0 if (importcat== 0) & ( sourcecat == 1)
tab gotcat
Then presumably, it is:
xi: logit gotcat residential
Where "residential" is a categorical variable wherein residing in a rural household = 1 and residing in an urban household =0
Is this the best way to get to evaluate the question of interest?
Thank you in advance
Related Posts with difference in proportions
The label is too long to fit on the X axis.Hi I'm stata beginner. I 'm drawing graph, but label is too long to fit on the X axis. Array Is t…
Can I draw logistic odds ratio coefplot with two x axis range according to variable ?Hi. I'm stata beginer. I want to draw odds ratio graph using coefplot. But difference of CI betwee…
Finding Percentage Occurrence of a Dummy Variable Given the Values of Several Other VariablesHello, I apologize in advance for any beginner's mistakes, as this is my first post. I'm working wi…
Setting string ID and string time variable - Panel DataI have a quarterly panel data of 20 countries from 2000q1-2012q4. When I import the excel file, both…
Panel Data model: Fe ReHi, I am very new to the stata software and keep getting stuck. Any help would be appreaciated. I a…
Subscribe to:
Post Comments (Atom)
0 Response to difference in proportions
Post a Comment