I use Stata 15.1.
I have a daily data (t=90) on Facebook linkclicks (DV), in three different cities (FE). Yet, for each day, each city has 5 data observations (one for each of five age-categories).
I'm not sure how to run a model as a panel data which accounts for potential time series issues. Below is small sample for two days of the Facebook campaign.
Thanks!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str10 reportingstarts byte(campaign_day city_code day_of_week) float(weekend age_cat gender_i) byte linkclicks1 int(reach impressions) "2017-01-25" 1 2 4 0 2 2 1 1375 1384 "2017-01-25" 1 2 4 0 2 1 1 1209 1219 "2017-01-25" 1 2 4 0 4 2 0 20 21 "2017-01-25" 1 2 4 0 3 1 0 464 465 "2017-01-25" 1 2 4 0 4 1 0 31 31 "2017-01-25" 1 2 4 0 3 2 0 456 459 "2017-01-25" 1 3 4 0 2 1 1 399 400 "2017-01-25" 1 3 4 0 4 1 0 7 7 "2017-01-25" 1 3 4 0 3 2 0 396 401 "2017-01-25" 1 3 4 0 3 1 0 161 162 "2017-01-25" 1 3 4 0 2 2 1 1032 1036 "2017-01-25" 1 3 4 0 4 2 0 19 19 "2017-01-25" 1 4 4 0 4 2 0 12 13 "2017-01-25" 1 4 4 0 2 1 0 234 235 "2017-01-25" 1 4 4 0 3 1 1 106 106 "2017-01-25" 1 4 4 0 3 2 0 383 384 "2017-01-25" 1 4 4 0 4 1 0 8 8 "2017-01-25" 1 4 4 0 2 2 1 848 852 "2017-01-26" 2 2 5 1 2 1 1 956 962 "2017-01-26" 2 2 5 1 4 1 0 17 18 "2017-01-26" 2 2 5 1 3 2 0 377 380 "2017-01-26" 2 2 5 1 2 2 0 1063 1068 "2017-01-26" 2 2 5 1 3 1 0 389 389 "2017-01-26" 2 2 5 1 4 2 0 15 15 "2017-01-26" 2 3 5 1 4 1 0 9 9 "2017-01-26" 2 3 5 1 2 2 2 871 873 "2017-01-26" 2 3 5 1 2 1 1 345 345 "2017-01-26" 2 3 5 1 4 2 0 20 20 "2017-01-26" 2 3 5 1 3 1 1 136 137 "2017-01-26" 2 3 5 1 3 2 1 324 326 "2017-01-26" 2 4 5 1 4 2 0 13 14 "2017-01-26" 2 4 5 1 3 2 0 342 343 "2017-01-26" 2 4 5 1 2 2 1 799 801 "2017-01-26" 2 4 5 1 2 1 0 252 253 "2017-01-26" 2 4 5 1 4 1 0 3 3 "2017-01-26" 2 4 5 1 3 1 0 93 93 end label values city_code city label def city 2 "Ramet_Gan", modify label def city 3 "Rishon_lezion", modify label def city 4 "Tel-Aviv", modify label values day_of_week week_day label def week_day 4 "Wednesday", modify label def week_day 5 "Thursday", modify label values age_cat age_cat label def age_cat 2 "Age_25-34", modify label def age_cat 3 "Age_35-44", modify label def age_cat 4 "Age_45-54", modify label values gender_i gender_1 label def gender_1 1 "Male", modify label def gender_1 2 "Female", modify
0 Response to Analyzing panel-data with multiple observations per time period (or two-way fixed effect)
Post a Comment