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

How to predict, using plm()? #19

Closed
OleksiyAnokhin opened this issue Mar 7, 2022 · 4 comments
Closed

How to predict, using plm()? #19

OleksiyAnokhin opened this issue Mar 7, 2022 · 4 comments
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@OleksiyAnokhin
Copy link

Hi team, thanks for a great package?
I check all possible resources, but do not see how to used predict() or prediction() with plm.

Currently I am trying:

predictions <- predict(plmFit1, panel_df_test)

and get

Error in crossprod(beta, t(X)) : non-conformable arguments

@tappek
Copy link
Collaborator

tappek commented Apr 17, 2022

Hi, seems like you were trying to predict using a within model. That case what not implemented - until now in the development version (commits: b81d759, 93a51bd, 4c44fef, cd48d6f) .

Be aware that the within case is somewhat special, more so with out-of-sample prediction. The help page ?predict.plm has the details and examples.

Feedback is welcome!

To install the development version from GitHub:

# install.packages("remotes") # remove '#' if pkg 'remotes' is not installed
remotes::install_github("ycroissant/plm")

@tappek tappek added this to the next release milestone Apr 17, 2022
@tappek tappek added bug Something isn't working enhancement New feature or request labels Apr 17, 2022
@tappek
Copy link
Collaborator

tappek commented Apr 22, 2022

Closing this because it is solved.

@tappek tappek closed this as completed Apr 22, 2022
@tappek
Copy link
Collaborator

tappek commented Aug 17, 2022

On CRAN as plm 2.6-2 as of 2022-08-16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants