Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check balanced panels are balanced #7

Open
nilshg opened this issue Aug 9, 2024 · 0 comments
Open

Check balanced panels are balanced #7

nilshg opened this issue Aug 9, 2024 · 0 comments

Comments

@nilshg
Copy link
Owner

nilshg commented Aug 9, 2024

Currently when feeding an unbalanced data set into the BalancedPanel constructor, an inscrutable error is thrown as this

    for (row, i) ∈ enumerate(is), (col, t) ∈ enumerate(ts)
        Y[row, col] = only(df[(df[!, id_var] .== i) .& (df[!, t_var] .== t), outcome_var])
    end

throws on only when there's a period for which one of the units does not have an observation. This should be handled with a useful error message before construction of Y is even attempted (likely we need to check setdiff between dates for all units, might be expensive?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant