jacob-long / jacob-long/interactions

Unable to plot interaction of plm output

Open
#41 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
R
Stars
135
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Hello. I'm trying to plot the interaction of a plm output, but it keeps giving me the following error. I've tried uninstalling and reinstalling R and the packages therein, but to no avail. Would you be so kind as to help figure out what is happening? Your help is much appreciated. Thank you!

Model run:
plm(data = data, formula = y ~ x1 + x2 + x1*x2, model = "within", index = c("grp", "year")))

> Error: ~does not appear to be a one- or two-sided formula.
> y does not appear to be a one- or two-sided formula.
> x1 + x2 + x1 * x2 does not appear to be a one- or two-sided formula.
> Backtrace:
> 1. interactions::interact_plot(...)
> 2. jtools::get_data(model, warn = TRUE, ...)
> 4. jtools:::get_lhs(formula)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported model with plm and the interaction plotting entry point interactions::interact_plot. Trace the error through jtools::get_data and jtools:::get_lhs, which are the only implementation entry points named here. Done means identifying why the plm formula is rejected and confirming a fix or documenting the compatibility limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.