ProfessorAmanda / econsimulations

This repository provides the code underlying simulations for teaching statistics and econometrics. The project site, which includes teaching materials as well as the link to the simulations, is located here: https://amandagreggeconomics.com/statistics-simulations-project/
Other
1 stars 0 forks source link

New OVB Example - Marriage and Life Satisfaction (happiness) #218

Open tbyker opened 3 years ago

tbyker commented 3 years ago

So I extracted some data from The American Time Use Survey and confirmed this conceptually as a proof of concept and to get a sense of the units for the outcome (a 10 point scale is what they are using...we can think of something maybe a bit more continuous). But I think we need to generate our own data if we want this to have a "choose your own adventure" structure, which we do. I started looking at the code Ethan sent and am percolating ideas. I won't be able to work on it until tonight.

The scatter between satisfaction and indicator for being married: image

Some evidence of the OVB wrt to having kids, for example:

image

Income: image

But this is really just showing that in reality the OVB exists (which is relevant) but doesn't get us quite to generating our own data. As I say, I hopefully be able to look at it again later today. But Ethan, very happy to have you play around with it. It will be combination of the elements of the current OVB and the data structure (ie. there is a binary regressor) of Job Corps.

tbyker commented 3 years ago

Ok. After thinking about this a little more, I am coming around to the conclusion (that maybe you two already had) that this is harder to implement than I imagined. The issue is that we need to find a way to generate bivariate distributions that are not normal. We have a function and example of generating bivariate normal distributions when we supply means, sd and covariance. But in this case one of our variables is binary (aka has a Bernoulli distribution). So we need to find a way to generate bivariate Bernoulli distributions (if the omitted variable is also binary, eg: do you have kids), or bivariate distributions where the distributions are different Bernoulli and normal (eg: the omitted variable is earnings). I believe this is doable in theory. But I don't think I can figure it out quickly (and especially figure out how to implement in javascript). We may need the help of a mathematician (statistician). I will send along some papers that MAY be useful.

Ethan, are you interested in investigating this a bit? Maybe reaching out to math profs? Looking at the papers I found?

tbyker commented 3 years ago

1-s2.0-0047259X9090084U-main.pdf mathematics-08-01776-v2.pdf

ethansaxenian commented 3 years ago

1-s2.0-0047259X9090084U-main.pdf mathematics-08-01776-v2.pdf

Thanks for these, I'll check them out.

You may be right that this might be too complicated given the time we have left.

ethansaxenian commented 3 years ago

Ok I will admit, this is all going way over my head.

ProfessorAmanda commented 3 years ago

Totally okay to leave this one in the "long term" hopper, perhaps, until we come up with a tractable way to make forward progress.