How to use Monthly data point in Panel Mixed Effect Model
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi All,
How to use Time Series Monthly data into a Panel Mixed Effect Model ...
0 commentaires
Réponses (1)
Neev
le 22 Juin 2023
In order to achieve your desired result, I would advice you to use 'fitglme' function in order to successfully complete multi-objective optimization. This can be done as follows ->
1. You can first load the time series monthly data into MATLAB as a table using 'readtable' function. In case your data is in a different format, you will have restructure and pre-process the data into a table to get desired results.
2. Now, use 'fitglme' function as below-
% first you will have to define your fixed effects model (say as below example)
fixed_model = 'y ~ x1 + x2 ... + xn';
% then, you will have to define your intended random effects model (say as below example)
random_model = ~1+x1+x2+...+xn;
% now define name of your date (we use date as a parameter for time here)
TimeVar = 'date';
% now, create your desired formula using group variables for the panel data you inputed
Formula = [fixed_model ' (1|GroupVariable) + (' TimeVar '|GroupVariable)'];
% At last, you have to fit the mixed effects panel model using 'fitglme' function
panel_model = fitglme(T, Formula, 'Distribution', 'Normal', 'Link', 'Identity');
3. just do summary(panel_model) now to display the new table with panel mixed effect model incorporated.
The approach I have provided is a generic one, you can work on this framework after pre-processing your data table which is to be inputed according to above given format. But, 'fitglme' function should help you get your desired output.
I hope I was able to help you
0 commentaires
Voir également
Catégories
En savoir plus sur Hypothesis Tests dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!