insongkim / wfe

20 stars 4 forks source link

Panel data inquiry #4

Closed francobeltran closed 5 years ago

francobeltran commented 5 years ago

Hi. I have been trying to run your package on a cross sectional data set. So far the only way I get wfe to work is if I collapse/summarize the dataset by "unit" and "time." In my dataset unit stands state and time for year. Whenever I run wfe on individual observations, i.e. without collapsing, I get the following error:

Error in $<-.data.frame(*tmp*, "W.it", value = numeric(0)) : replacement has 0 rows, data has 4231

This becomes a limitation as within the same unit and time cell, according to my identification, some units may be treated and others not. If I collapse data by unit and time, treatment stops being a binary (0/1) and since wfe requires this, the code breaks. Turning this continuous variable into a binary by rounding up solves the issue but estimates have a completely different interpretation. Is there any option within the wfe package that accounts for this?

Best, Franco

insongkim commented 5 years ago

Thanks for using the package. Unfortunately, the methods works only for a panel dataset with a binary treatment, and it currently does not accommodate continuous treatment. As you described, you could set method = “unit” or method = “time” to adjust for state- or time-specific one-way fixed effects.

francobeltran commented 5 years ago

I understand. Thank you very much for your quick response.

From: insongkim notifications@github.com Sent: Saturday, April 20, 2019 6:52 PM To: insongkim/wfe wfe@noreply.github.com Cc: Francisco Beltran Silva fbeltransilva1@student.gsu.edu; Author author@noreply.github.com Subject: Re: [insongkim/wfe] Panel data inquiry (#4)

Thanks for using the package. Unfortunately, the methods works only for a panel dataset with a binary treatment, and it currently does not accommodate continuous treatment. As you described, you could set method = “unit” or method = “time” to adjust for state- or time-specific one-way fixed effects.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Finsongkim%2Fwfe%2Fissues%2F4%23issuecomment-485190155&data=02%7C01%7Cfbeltransilva1%40student.gsu.edu%7Cb2029da0cfb84ac184c008d6c5e2c56e%7C704d822c358a47849a1649e20b75f941%7C0%7C0%7C636913975096389109&sdata=p5Q1UI9sIhq6U%2FM1nUsPbfuqw3klucGSBKRncPrXb7Q%3D&reserved=0, or mute the threadhttps://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAL34Z3KAZM3763U5M3NEVNDPRONAHANCNFSM4HHJ6XNA&data=02%7C01%7Cfbeltransilva1%40student.gsu.edu%7Cb2029da0cfb84ac184c008d6c5e2c56e%7C704d822c358a47849a1649e20b75f941%7C0%7C0%7C636913975096399109&sdata=LJct44NVo9jcS8qCXgvdkyK6FMP0Rr%2FP%2Fx8bB8XmPSM%3D&reserved=0.