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
Interpretation of an interaction term when coefficient of one of the constitutive term is missingGreetings, I am having a debate with a friend about some regression results. Say two independent var…
Replace String VariableHi, I have a missing string variable: STRING YEAR 1990 How can I write a text "AAA" in the missi…
What happens if the lags of dependent variables are not significant in system GMM regression?Dear all, I am using xtabond2 to estimate my model. Although the coefficent of interest variable is…
Splitting up gen OK=1 if ... into several expressionsHi, I try to run the following command gen OK=1 if strpos( name, "one") >0 | strpos( name, "t…
Dynamic Spatial Panel Model with XSMLE "Convergence Not Achieved"Dear Stata Users, I am trying to analyze the impact of minimum wages on employment (divided into fo…
Subscribe to:
Post Comments (Atom)
0 Response to difference in proportions
Post a Comment