Cross Validated Asked by Fabio on September 21, 2020
I am new to R and only know the very basics. Currently I am trying to estimate a model which is very simple, but I have problems thinking about how to set it up. Precisely, I am trying to estimate the following equation:
a(t) - a(t-1) = alpha + beta1 c(t) + beta2 c(t+1)
My data consists of 341 scenarios and each scenario calculates me 10 values for a and 10 values for c, meaning I got "10 ts", which gives me in total 341x2x10 = 6820 data points.
My problem is that I don’t know how to set this up. I brought my data already into tidy format and now I just want to get started, but how?
Looping approach
Should I try to estimate this equation for 1 scenario and then try to loop the resulting code over the other scenarios? And if yes, how exactly would I do so? By using the diff() function, storing the result somewhere, looping over the other 340 scenarios, which would give me 341 stored results? How would I then combine these 341 results in the end?
Time series / panel data approach
Should I rather focus on "the panel data character" of my data? (to be honest I am not even sure if it’s panel data or time series). In that case I would read a bit more into working with time series / panel data.
I am sure there are several options to do this (quite basic) estimation. I just don’t know which way to go, and once I decide for a specific way, how to carry it out and set it up.
I would just like to have a kind of roadmap for how to set this whole thing up.
My advice is go for panel, the best choice here.
https://cran.r-project.org/web/packages/plm/vignettes/plmPackage.html
Really simple package to understand and a good example in this link.
Answered by josef_joestarr on September 21, 2020
1 Asked on February 18, 2021 by forlooper
1 Asked on February 18, 2021 by borut-flis
0 Asked on February 17, 2021 by kaaren0111
1 Asked on February 17, 2021 by xxtensionxx
bayesian conjugate prior exponential family prior self study
1 Asked on February 17, 2021 by aflatoun
1 Asked on February 17, 2021 by exlo
1 Asked on February 17, 2021
1 Asked on February 16, 2021 by xe-m
2 Asked on February 16, 2021 by user1272262
0 Asked on February 16, 2021 by davud-mursalov
1 Asked on February 16, 2021 by johnny5ish
0 Asked on February 15, 2021 by wilmer-e-henao
2 Asked on February 15, 2021 by pterojacktyl
0 Asked on February 14, 2021 by ahmet-turul-bayrak
0 Asked on February 14, 2021 by gracetam
1 Asked on February 14, 2021
0 Asked on February 14, 2021 by fouzia-farooq
4 Asked on February 14, 2021
mathematical statistics statistical significance zero inflation
1 Asked on February 14, 2021 by fuca26
4 Asked on February 14, 2021 by gpuguy
Get help from others!
Recent Answers
© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir