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

does pgmm support categorical variables? #53

Open
palmierieugenio opened this issue Apr 16, 2024 · 0 comments
Open

does pgmm support categorical variables? #53

palmierieugenio opened this issue Apr 16, 2024 · 0 comments

Comments

@palmierieugenio
Copy link

I am trying to run a model like this (this is a minimal example with less variables), where A and B are categorical variables

fit<- pgmm(Y~lag(Y, 1)+lag(A, 1)+ B | lag(Y, 1:3) ,
                    data = dati_long_positive, 
                    index = c("id","year"),
                    model = "twostep",
                    effect="individual"
)

Are expressions like "+lag(A, 1)" or "+ B" supported if A and B are categorical variables? How are categorical variables handled in pgmm?

I have noticed that if I use A and B as a factor, my model does not run, while if I expand them in dummies with model.matrix it works, but I am not sure if it makes sense.

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

1 participant