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

Incorrect "Error: The time variable must be defined as an integer." #2

Open
aakosm opened this issue Jul 28, 2020 · 4 comments
Open

Comments

@aakosm
Copy link

aakosm commented Jul 28, 2020

For some reason I am not able to find I get the error message: Error: The time variable must be defined as an integer. when I try to run a model.

Replication code:

In the gapminder data, the year variable is integer by default:

panel_data <- gapminder::gapminder

pcse_ar1 <- panelAR::panelAR(lifeExp ~ pop + gdpPercap, data = panel_data, panelVar = 'country', timeVar = 'year', autoCorr = 'ar1', panelCorrMethod = "pcse")
> is.integer(panel_data$year)
[1] TRUE
@roboldham24
Copy link

Did you ever figure out the problem here? I am running into the same issue and can't seem to find anything else on the net that answers the question.

@ConorRobinson78
Copy link

yes, me too.

@aakosm
Copy link
Author

aakosm commented Mar 20, 2021

no luck so far for me (didn't tried much tho)

@sergiulipcean
Copy link

sergiulipcean commented Apr 23, 2021

Encountered the same problem, but I solved the issue by transforming my dataset into a "data.frame" type exclusively. Before that it had 3 classes "tbl_df", "tbl", and "data.frame" but after the transformation "as.data.frame()" it worked, at least in my case.

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

4 participants