-
Notifications
You must be signed in to change notification settings - Fork 13
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
Non-standard names in formula evaluation #37
Comments
I will need to look at that more closely. A quick check of -> I read this as backticks in formulae can cause issues already in only base R setups. However, in your example why would you like to estimate a two-way FE model as a one-way model and a dummy for the other dimenson (and not simply setting |
The example is just to illustrate the idea. My use case would have been to long to explain. |
Hi Kevin,
The code works for me with my installed (2.6-1) version of plm.
Best
Yves
…--
library(plm)
data("Grunfeld", package="plm")model1 = plm(inv ~ value + capital +
factor(year),
data = Grunfeld, model = "pooling")
Le mar. 22 nov. 2022 à 20:43, Kevin Tappe ***@***.***> a
écrit :
I will need to look at that more closely.
However, in your example why would you like to estimate a two-way FE model
as a one-way model and a dummy for the other dimenson (and not simply
setting effect = "twoways")?
—
Reply to this email directly, view it on GitHub
<#37 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2LAVJLGCJUEGQ3GCVCFU3WJTZ35ANCNFSM6AAAAAASH45X7Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
<http://www.univ-reunion.fr> <http://ufr-de.univ-reunion.fr/>
Yves Croissant
Professeur de Sciences Economiques
UFR de Droit et d'Économie
Université de La Réunion
Interne : 2338 | Externe : +262 262 93 84 46
.
|
It does not run with 2.6-1 on my end, also not with 1.7-0 (i.e., in the non-current By the time plm gets to access the data, the non-syntactially valid name The issue is not with backticks per se but with the paranthesis in
It works with A workaround would be to ensure syntactically valid names und use these in the formula, so something along these lines:
|
Thank you for your digging into this issue |
Although there exists a workaround I came across this issue and have to say it is rather suprising! I am using age groups as variables, so it is rather intuitive to include numers in column names. Since it works with the lm function I do argue the value of digging deeper into this issue is worth the effort! |
I am having the same issue. My dependent variable starts with "z_". plm() keeps saying object not found. |
Do you have a reproducible example for your
|
Thank you, @tappek. I am not sure how to create a reproducible example. I will try. Just FYI - while the same dataset and variable names worked with lm() and lmer(), plm() kept showing object not found. For some reason, colnames(df_pdataframe) and head(df_pdataframe) kept showing different column names. Anyways, I had to go back to lmer(). |
Spontaneously, I cannot come up with a reason why https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example gives some hints how to create one. |
Hi,
I have noticed backticks do not work in
plm
formula.I think it would be useful for people who would want
to create two stage models without transforming the data twice.
Example:
The text was updated successfully, but these errors were encountered: