treatment effect on unbalanced panel data I have an unbalanced dataset that contains movie sales data along with some of the characteristics of the movies for several years.
One treatment (event) happened in the society in a specific year in between.
Now, I want to investigate using R software whether this treatment affected sales of the movies with some special characteristics or not. My issue is that as I checked a lot of difference-in-differences (DiD) and fixed effects (FE) models, the treatment population is the same before and after the treatment which is not in my case. The movies released before the event are completely different from the ones released after that event, and I am looking for any change in the coefficient of a movie character on its sale.
Kindly, would you please guide me to which model or R package should I use?
 A: Take note of the comments by @DimitriyV.Masterov. Difference-in-differences works well with repeated cross-sections data. Your equation would look something like the following:
$$
y_{ist} = \alpha + \gamma S_s + \lambda A_{t} + \delta (S_s \times A_{t}) + \theta X_{ist} + \epsilon_{ist}
$$
where $y_{ist}$ denotes movie $i$ in society $s$ at time period $t$. The variable $S_s$ is a treatment dummy equal to 1 for your non-US society, 0 otherwise. If I understood you correctly, you only observe movie sales within two societies (i.e., US and non-US) across time. $A_{t}$ is a post-treatment indicator for all years after 2011 in both treatment and control groups. $X_{ist}$ is a vector of all your individual level (i.e., movie-level) covariates and/or any other time-varying controls at the society level. Often times we think about this equation as only applying to panel data. This is not true, though. In your setting, all that's required is random samples of movies from your societies before and after treatment.
If you think about it, you could create a pseudo-panel by aggregating your data up to the society level. In other words, in each society $s$ and time period $t$ you calculate the proportion of sales for violent Sci-Fi movies. It wasn't clear what your outcome is but you get the general idea. Given the richness of your data at the individual (movie) level, there is no requirement to aggregate your data up to the level of the society. I only noted this to help with your intuition. Again, all that's necessary is a random collection of movies from societies in the periods pre- and post-shock. Moreover, this shock (i.e., treatment) is usually at some higher, well-defined level of aggregation. In your case, your treatment influences all non-US movies so you can certainly proceed with the classical difference-in-differences approach.
As for question regarding software, models such as the one suggested earlier can be run in base R using the lm() function (e.g., lm(y ~ S*A + X, data = ...). Everything should run smoothly once the variables are coded properly. If you want to extend this model to more societies (i.e., regions, counties, cities, etc.) and/or time periods and also introduce group and/or time fixed effects, then you may want to look into the plm or lfe packages.
