How to create time-varying country fixed effects in gravity models

Hi, I am a begginer in R and I am trying to estimate the ppml gravity model in R using the package "gravity" and I would like to know how to add time-varying country fixed effects in the regression. The dataset includes international exports of one country over 18 years. I need the country fixed effects to vary over time in order to account for the multilateral resistance term and because of collinearity problem (FEs with the explanatory variables) due to region-specific regression. How can I account for them? When I try to multiply the variables "unit" and "year", R responds that this function is not available for factors. How can I create them?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.