insongkim / PanelMatch

111 stars 34 forks source link

Matched Set Object Error: column name invalid #131

Closed fringer15 closed 10 months ago

fringer15 commented 10 months ago

Good afternoon. I am an undergraduate writing a thesis, trying to use PanelMatch as a method. I've read all the guides and official documents but I encountered a problem right away at the beginning of my analysis.

While the Display Treatment function works well, I am unable to create a matched set object as R is giving me the following error message:

Error in panel_match(lag, time.id, unit.id, treatment, refinement.method, : time id, unit id, outcome, or treatment column name invalid

I do not know why and I renamed the variables a few times to check if it is related to some kind of spelling problem. Can anyone tell me what this problem is related to? Can this be caused by the fact that I have more variables in the dataset than the three mandatory ones? Or is it due to the unbalanced panel? In this case, I would expect a different error message than "column name invalid".

Thank you very much in advance!

Bildschirmfoto 2023-10-10 um 2 38 34 PM

My dataset consists of the following 8 variables:

country_name country_text_id code year histname v2x_regime v2x_regime_amb hyb (which is the treatment coded solely with 1 or 0)

fringer15 commented 10 months ago

This issue has been solved. Obviously, I missed the outcome variable. It should be replaced by an actual variable instead of "y". Please excuse the question/disturbance.

Kindest!

adamrauh commented 10 months ago

All good. Glad you figured it out!