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
test of differences in means (and medians) test between MNCs and domestic firmsDear all, After advising this forum hundreds of times for using STATA, I think its time to express …
Reporting risk ratio for meta-analysis of binary outcomesHi All, Help Needed Urgent!!! I am conducting a metanalysis for "All-cause mortality " data. I nee…
Outputting Multiple tables in the same word file using outreg2 Code: reg price treatment i.state ib2007.year i.sector , cluster(state) outreg2 using "${path}\Tab…
Query regarding appropriate ROC curve functionDear all I am calculating the ability of a diagnostic angle measurement that can differentiate betw…
Minutes and seconds coming out wrong with dhms() %tcI am constructing a date-time variable in 2 steps, using variables for year, month, day, hour, minut…
Subscribe to:
Post Comments (Atom)
0 Response to difference in proportions
Post a Comment