This is my first post so please excuse any errors. I would like to estimate ARIMA models to understand the relationship between changing labor force conditions and disability over time at the county level. I am measuring labor force changes by the percentage of goods-producing and service-providing industries over time. I have 44 years of data and hundreds of counties. I have multiple disability outcome variables where disability is measured as a continuous index of difficulties and also a dichotomous indicator of disability (yes/no). The unit of analysis is person within county, and the data are cross sectional so I have different individuals over time in counties. The percentage of goods-producing and service-providing industries and the continuous disability measures trend over time. Here is an example of what the data look like (in long format).
ID |
Year |
County |
# of disabilites |
% goods-producing industries |
% service providing industries |
|
01 |
2017 |
X |
0 |
28% |
72% |
|
02 |
2017 |
X |
3 |
10% |
90% |
|
03 |
2017 |
Y |
1 |
28% |
72% |
|
. |
|
|
|
|
|
|
. |
|
|
|
|
|
|
. |
|
|
|
|
|
|
. |
|
|
|
|
|
|
. |
|
|
|
|
|
|
. |
|
|
|
|
|
|
100 |
1973 |
X |
1 |
9% |
91% |
|
101 |
1973 |
Y |
0 |
25% |
75% |
|
My question is: How do I set up the data for an ARIMA analysis when I have multiple years? When I try to estimate ARIMA models I get errors stating that Stata cannot use multiple panels and errors related to have multiple years. Every example of time-series analysis I find has one observation per year, whereas I have multiple observations per year because I am looking at individuals within county-years.
Here is the code I used:
tsset ID_variable year_variable, yearly
ARIMA disabilityindex_variable industry_variable, arima(1,1,0)
Thank you for any help you can provide and I am happy to provide more information if necessary.
0 Response to Formatting data for ARIMA modeling
Post a Comment