Ask me anything

So I get cold emails probably a few times a month asking random coding questions (which is perfectly fine — main point of this post!). I’ve suggested in the past that folks use a few different online forums, but like many forums I have participated in the past they died out quite quickly (so are not viable alternatives currently).

I think going forward I will mimic what Andrew Gelman does on his blog, just turn my responses into blog posts for everyone (e.g. see this post for an example). I will of course ask people permission before I post, and omit names same as Gelman does.

I have debated over time of doing a Patreon account, but I don’t think that would work very well (imagine I would get 1.2 subscribers for $3 a month!). Ditto for writing books, I debate on doing a Data Science for Crime Analysts in Python or something along those lines, but then I write the outline and think that is too much work to have at best a few hundred people purchase the book in the end. I will do consulting gigs for folks, but the majority of questions people ask do not take long enough to justify running a tab for the work (and I have no desire to rack up charges for grad students asking a few questions).

So feel free to ask me anything.

Leave a comment

6 Comments

  1. Calli

     /  June 22, 2021

    What is the best method to examine whether there are group differences (e.g., gender, race) in the effects of several variables on binary outcomes (using logistic regression)? For example – if you want to look at the gendered effects of different types of trauma experiences on subsequent adverse behaviors (e.g., whether participant uses drugs, alcohol, has mental health diagnosis, has attempted suicide).
    Allison (1999) cautions against using Equality of Coefficients tests to look at group differences between regression coefficients like we might with OLS regression. If you wanted to look at the differences between a lot of predictors (n= 16) on various outcomes (n=6) – what would be best way to go about it (I know using interaction terms would be good if you were just interested in say gender differences of one or two variables on the outcome).
    Someone recommended comparing marginal effects through average discrete changes (ADCs) or discrete changes at representative values (DCRs) – which is new to me. Would you agree with this suggestion?
    Thanks in advance for your expertise! Always love reading your posts.

    Reply
    • They are a bit horses for courses, but I will slate a response in a future blog post about it. In general I think about the estimate I want to produce in the end. So if I want to say something along the lines of, “The presence of X on average increases the probability of trauma in females by 5%, and the probability of trauma in males by 10%” then that is marginal effects/average discrete changes that best estimate that quantity.

      If you want to make a statement along the lines of “The presence of X on average increases the rate of trauma in females by 50%, and the rate of increases in males by 20%” that is better approximated via Wald tests on the logit coefficients.

      Reply
  1. Using google places API in criminology research? | Andrew Wheeler
  2. Some microsynth notes | Andrew Wheeler
  3. Marginal effects vs Wald tests (Stata) | Andrew Wheeler
  4. How to interpret one sided tests for coefficient differences? | Andrew Wheeler

Leave a Reply to Calli Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: