Message Boards Message Boards

Forecasting with paneldata - ANN-Gaussian Process Model

Hello.I want to predict CO2 emission for a country. My data is for 28 province in 15 year.How can I import data in panel data structure in wolfram mathematica? I want with using this data, predictive Co2 emission became the average of this provinces and I have only one value for each year. because I want to use relative errors and other graphs to compare model.

Attachments:
POSTED BY: elham shabani
2 Replies

Thank you dear Rohit. When we use time series data for forecasting or prediction a variable, we have only one observation in one special year or month or day. Because of data limitation, I use Panel data.TO prediction CO2 emission In Iran, I had only 31 observation. I decide to collection CO2 emission data from all provinces of Iran in 15 years. So I have 28 observation for each year, so I have 420 observation.
Is there any special codes to import this types of data(panel data) in wolfram mathematica?

POSTED BY: elham shabani
Posted 4 years ago

Hi Elham,

Not sure what you mean by "panel data". Maybe you mean Dataset? If so, this should get you started.

dataset = Import["~/Downloads/Book1.xlsx", {"Dataset", 1}, HeaderLines -> 1]

enter image description here

Group by year and compute mean of perco2.

meanCO2ByYear = dataset[GroupBy["year"], Mean, "perco2"]

enter image description here

Plot it

meanCO2ByYear // Normal // ListLinePlot

enter image description here

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract