enter image description hereI have one 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 check with r whether this treatment affected sales of the movies with some special characteristics or not. My issue is that as I checked a lot of DiD and FE models, the treatment population is the same before and after the treatment which is not in my case. Because 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 that which model or r package should I use?
treatment effect on unbalanced panel data
294 Views Asked by Lili.Y At
1
There are 1 best solutions below
Related Questions in R
- How to make an R Shiny app with big data?
- How do I keep only specific rows based on whether a column has a specific value?
- Likert scale study - ordinal regression model
- Extract a table/matrix from R into Excel with same colors and stle
- How can I solve non-conformable arguments in R netmeta::discomb (Error in B.matrix %*% C.matrix)?
- Can raw means and estimated marginal means be the same ? And when?
- Understanding accumulate function when .dir is set to "backwards"
- Error in if (nrow(peaks) > 0) { : argument is of length zero Calls: CopywriteR ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution ha
- How to increase quality of mathjax output?
- Convert the time intervals to equal hours and fill in the value column
- How to run an R function getpoints() from IPDfromKM package in an R shiny app which in R pops up a plot that utilizes clicks to capture coordinates?
- Replace NA in list of dfs in certain columns and under certain conditions
- R and text on Cyrillic
- The ts() function in R is returning the correct start and frequency but not end value which is 1 and not 179
- TROUBLING with the "DROP_NA" Function
Related Questions in LINEAR-REGRESSION
- Batch Gradient Descent algorithm in python is returning huge values
- Error in running a multi-level mixed effects model on microbiome data
- How can I improve R2 score in my regression model? Predicting House Prices
- I have two dataframes representing two different time points. I want to run a linear regression model with data from both time points
- GMMAT model fit and AIC
- Fitting a curve using Linear regression - CLS and NMF
- Error with WLS estimation in R: missing or negative weights not allowed
- Fitted surface does not resemble the heatmap produced from the same data
- Beta coefficient of direct effect increases after controlling for mediator
- How to exclude abnormal data points and smooth the data before linear fitting
- Performing a simple ridge regression
- Why TukeyHSD test keeps returning NA for a linear model in R?
- Inquiry regarding a linear regression model using Python and pandas
- How to find the x-intercept of Weibull distribution
- PyTorch matrix multiplication shape error: "RuntimeError: mat1 and mat2 shapes cannot be multiplied"
Related Questions in PANEL-DATA
- Is there a way to cluster standard errors for seemingly unrelated regression (SUR) in R?
- Fixed effect panel regression gives coefficients for each year
- Specifying panel data as survey object
- Using vcovHC to random effects model in R - clustering by both time and entity?
- Predict Panel Data Model values with a LSTM network
- DCE mlogit R error: system is computationally singular
- PLM package: Difference between PMG and PCCE function
- Creating T-1 variable | R
- How to do interrupted time series analysis using R's plm?
- pgmm and pvargmm producing different results in GMM estimations
- rollapply a function across different columns in a panel dataset
- R function/package to conduct Hausman test for panel count data after the use of pglm r function
- How to do hyper-parameter tuning with panel data in sklearn framework?
- group_by (dplyr, R) not working with unit ID and time--aggregating by unit ID only
- Dynamic fixed effect model
Related Questions in PLM
- Bootstrap panel data: randomly selecting individuals, not the person-waves
- "Error in checkNA.index(index) : NA in the individual index variable" when using a bootstrapped dataset as input for the plm function in R
- PLM package: Difference between PMG and PCCE function
- Fixed-effects regressions with Amelia object
- Add overall intercept to stargazer table in R in panel data analysis fixed effects model
- Creating T-1 variable | R
- How to do interrupted time series analysis using R's plm?
- How to do nested and non-nested panel model comparisons?
- Display plm Model Results: Marginal Effects, p-Values for Interaction Terms, and Plots (Fixed Effects Method)
- pgmm and pvargmm producing different results in GMM estimations
- Developing Spatial Weights for points with panel data
- FIxed effects with plm, problem with NaNs
- Dynamic fixed effect model
- exporting multiple regression results in R
- How can I create panel dataset with transaction data using plm package in R?
Related Questions in CAUSALITY
- confidence Interval for binary outcome
- Inconsistent ATE Estimation - EconML
- How to make bnlearn and dowhy compatible in jupyter notebook?
- IPTW using ipw and weightit packages in R
- Creating a causal graph from observed data without prior knowledge on causal relationships of the features
- How to extract inclusion probabilities of predictors from tfcausalimpact library
- 2SLS Regression in R with binary endogenous variables
- Causaltune error (fit() missing 2 required positional arguments)
- How to make nonlinear predictions on categorical variables in causal inferece given causal graph?
- Analyzing Impact of a Single Independent Time Series Variable on a Cluster of Dependent Variables in R
- Cobalt and MatchThem: Post Imputation analysis
- ipwtm() assessing covariate balance
- causal relationship in SEM model
- Stata Simple Randomization in One Line WITHOUT USING SPLITSAMPLE
- AttributeError: 'CausalModel' object has no attribute 'causal_estimator' (Causal Inference and Discovery in Python)
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You could use a linear model from the package
statsand use the formulaThis would partition the variance in sales that is explained by each of your variables (namely characteristics). However it is difficult to answer your question without an idea of what your dataset looks like. For a simple linear model to work your residuals need to be normally-distributed and the variances homogeneous, among other assumptions.
ADDENDUM 1 Since your treatment is an event that affects all movies in the US past 2011, you should code it as a 0/1 variable with something like
Then if you are interested in the effect of the treatment on the coefficient of some other characteristic then you are interested in the interaction between treatment and a characteristic in question. This would be coded with a
*like so:It will be important to think carefully beforehand about which characteristic should be influenced by the treatment and not to test every possible combination (I don't know how many individual movies you have (i.e. how large your n is) but if you put an interaction on every term you might have a hard time at estimating coefficients).
ALSO, you should think about the structure of your data. If you have multiple movies from the the same country, as well as multiple movies in the same year, and in the same genre, these factors may influence the sales and as such it is important to include them in your model (if they are not variables you are interested in and if there are many categories, you may include them as random effects). For example the year that the movie came out may influence the sales because it was a recession year, or because there was a pandemic or any other reason we can't quite grasp. This is a good example of when we would code year as a random effect (although there is MUCH dissent on what should or should not be used as a random effect and when it should be used as a fixed effect rather than a random effect, you can read about this here). You can use the
lme4ornlmepackages to code random effects in your model. I likelme4because of the simplicity of the coding of random effects and because it doesn't give back p-values. To get you started, here is how you would code random effects model inlme4:Let us know how it works!