Closed ew487 closed 2 years ago
Hi @jmshapir, I'm having trouble adding @torenfronsdal as a reviewer, do you know how to fix this?
Hi @jmshapir, I'm having trouble adding @torenfronsdal as a reviewer, do you know how to fix this?
I added @torenfronsdal to the repository and was able to add @torenfronsdal as a reviewer.
(For now @torenfronsdal has read access; we can elevate to write if/as needed.)
I added @torenfronsdal to the repository and was able to add @torenfronsdal as a reviewer.
Great, thanks @jmshapir @torenfronsdal !
Update: I just found a problem with linpartial_var
& working on debugging.
@ew487 We may want to also add a test case where we implement linpartial_var
for some sample data.
Thanks @torenfronsdal, that's a good idea! I'll work on that.
Update: I just found a problem with
linpartial_var
& working on debugging.
It turns out that the bug does not have to do with linpartial_var
but actually occurs when some bins have no observations (for example, when I simulate data using low N
and have high nBins
). @jmshapir @torenfronsdal Could you please let me know what you prefer between adding code to handle this case, or raising an error & terminating?
Update: I just found a problem with
linpartial_var
& working on debugging.It turns out that the bug does not have to do with
linpartial_var
but actually occurs when some bins have no observations (for example, when I simulate data using lowN
and have highnBins
). @jmshapir @torenfronsdal Could you please let me know what you prefer between adding code to handle this case, or raising an error & terminating?
@ew487 @jmshapir Maybe we should decide on a minimum number of obs. per bin and throw an error if we have fewer.
This binscatter function (by my former coworker) requires at least 10 obs. per bin.
@torenfronsdal Ok! That makes sense. I'll add something like this. Thanks for this info!
@ew487 @jmshapir Maybe we should decide on a minimum number of obs. per bin and throw an error if we have fewer.
This binscatter function (by my former coworker) requires at least 10 obs. per bin.
This sounds fine to me. If we go this route, I think we should set a default minimum but let the user override if they wish.
If the resulting regression model is underidentified I think we should just let R throw whatever is the default error (presumably controlled by the underlying regression command) and terminate.
Update: I've added a test including linpartial_var
in 1a427a7, and the minimum observations per bin is implemented in f83a098 (in the Scatter
function that is renamed to BinScatter
in 2522030). Also, the GetMidpoint
, GetMeanval
, and MakeBinIndicator
functions are now standalone instead of locally defined functions in BinScatter
.
Closes #14
Note: confidence intervals still in progress.