Panel data set up
2 ビュー (過去 30 日間)
古いコメントを表示
I have a 1101704 x 4 table with the following variables about solar panels:
- date (MM/yyyy) when the panel was installed
- zip code for where it was installed
- cost variables
- and the size of the panel (total capacity)
I'm trying to set this dataset up as a balanced panel by month across the years for which the data is available (Dec 2000 - May 2021). Some zip codes have multiple observations per month in a given year.
I know I need to group the data by zip code and MM/yyyy, but having issues with a groupsummary script...To group together I'm trying to aggregate/sum the capacity by zip code and month/year and then do a weighted average of cost and incentive based on the capacity for that given zip code and month/year. should this be done in a for loop? I need the final dataset to have rows for each month (12) for all years (2000-2021), and zip codes that do not have observations for that given month be assigned "-9999" value...
I'm pretty new to MatLab so any help with this would be greatly appreciated!!!
installation_date zip cost incentive total_capacity
'12/2000' 11714 10433.2 3600 1.2
'12/2000' 11720 10700 3600 1.2
'03/2001' 11758 15249 5400 1.8
'03/2001' 11947 35143.3 13200 4.4
'07/2001' 11507 23219 6600 2.2
'08/2001' 11901 21900 7200 2.4
'08/2001' 11572 21800 7200 2.4
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で QSP, PKPD, and Systems Biology についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!