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
using "spmap"Hi guys, I am trying to map the result by using "spmap" command, yet keep having troubles with the …
FMM lcprob variablesHello experts, In FMM (finite mixture models), our main models(s) could have certain IVs. Then, I c…
calculating and graphing marginal effects from logit with interaction effect of two categorical variables Code: * Example generated by -dataex-. To install: ssc install dataex clear input byte(owndecision…
Writing loop for multiple regressionsI have 10 dependant variables, y1-y30, and its respective lagged variables, lagy1-lagy30. I would li…
How to present vignettes in a tabular formatHello everyone, Could you please help me to present vignettes in a tabular format rather than a run…
Subscribe to:
Post Comments (Atom)
0 Response to difference in proportions
Post a Comment