jacob-long / jacob-long/interactions
Unable to plot interaction of plm output
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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