Relationship Between Climate Change and Rice Production of Bangladesh: A data analysis using MCMC method

: In this project study, we analyzed publicly available agricultural data on rice production in Bangladesh between 2008 to 2017 to address the relationship between climate changes and rice production in Bangladesh by estimating predictor variables, i.e., average rainfall and maximum temperature, minimum temperature, and humidity. A generalized linear regression model sets up for each rice (Aush, Aman, Boro) with the climate variables (average rainfall, maximum temperature, minimum temperature, and humidity). We used Markov-Chain-Monte-Carlo's (MCMC)'s Gibbs sampling on the collected data to approximate marginal posterior distribution from the prior distribution to see the profound relationship between those predictor variables and the predicted variables (Aush, Aman, Boro). We also saw whether any storm's impact could modify the relationship between climate change variables and rice production in Bangladesh.

The effects of climate change in Bangladesh have already begun. As a result of global warming, reviewing various research reports, it is seen that by the year 2100 (Strauss, Benjamin H., et al. 2012), the sea level may be as high as 1 meter, as a result of which about 17.3 percent of the total area of Bangladesh may be submerged (Courchamp, Franck, et al. 2014). If this prediction comes true, Bangladesh will have to lose everything, including agriculture in the area, putting the country's food security at grave risk. According to Bangladeshi agriculturists, one of the signs of climate change in Bangladesh is rainfall patterns. There is not much rain in the month of Ashar-Shravan (May -June) 4-5 days in the month of Ashwin's (Augist) rain that causes waterlogging. Due to various reasons, including drought, the country's groundwater level is declining day by day, disrupting irrigation. As a result, the production of various agricultural products is being hampered.
On the other hand, the country faces frequent floods and droughts due to disruption of average rainfall. Natural disasters seem to have been established as the inevitable destiny for agriculture in Bangladesh. From 1973From -1978, only 21.6 lakh metric tons of paddy was lost due to drought. Floods, droughts, salinity, etc., have changed the type of agriculture in the country. At one time, several thousand species of paddy were cultivated in this country. At present, it has gone down a lot. Farmers turn to irrigation and cost dependent Boro paddy as the floods have caused severe damage to Aush and Aman paddy.
On the other hand, as the farmers are more inclined towards paddy, the land under pulses has decreased. As a result, the cultivation of pulses has decreased significantly. Moreover, the production of jute, wheat, and sugarcane has declined significantly. All in all, the future that is waiting for Bangladesh is unfortunate, says the expert (Ruane, A. C., et, al, 2013). Cultivating other rice in Bangladesh varies according to seasonal changes in the water supply. Furthermore, different rice needs a different amount of water supply. The two most important types of cultivated rice in Bangladesh are 'Aush' and 'Aman.' Usually, Aush is cultivated during March to April months and harvested in July to August in Bangladesh. The most accounted rice of Bangladesh's rice production Aman is ingrained simultaneously as Aush, and both harvested from mid-November to mid-December. (Rasheed, 2016). Whereas the winter crop of rice is 'Boro,' and December to January is the ideal time for planting the Boro seed, it harvested in April and May. As a result, the change of climate in Bangladesh is playing a significant role in producing rice. Not only just in producing rice but also in processing as well. For example, heavy rainfall is the leading cause of being flooded the west coast area of Bangladesh. This area surrounds by three main riversthe Padma, the Meghna, and the Jamuna. Comparatively, these areas are sloping areas than other regions in Bangladesh.
On the other hand, North coast areas are dry area and extremely cold during the winter season. So, North coast areas are more suitable for producing Aman and Boro rice than Aush rice. Some areas are hilly (Sylhet, Chittagong); those areas benefited from downfall hill waters in all seasons. Hence, the Bush crop is the main producing crop of those areas. However, heavy rainfall is a hindrance to produce Aush rice in those areas because heavy rainfall is a cause for collapsing mountain in these areas. Climate change will change the quality of crops, and the amount of production will be reduced in the current farming area. Water scarcity will occur; soil fertility will be reduced. New plagues may appear; as a result, the application of pesticides and fertilizers in agriculture should be increased. Irrigation scale, soil erosion, loss of fish diversity, and chemicals will adversely affect the environment. Poverty will increase, and it will hurt society. In the 21st century, overall agricultural production can be reduced by 30 percent. By 2050, the production of rice in Bangladesh will decrease at an alarming rate.
All this will be due to climate change. The effects of climate change are changing the temperature, rainfall, and type of humidity. Storm is hurting agricultural work for the last couple of years. As a result, the production of necessary rice in Bangladesh is being disrupted. Hence, it is essential to know the relationship between climate change and the rice production of Bangladesh. In this project study, our primary goal is to analyze publicly available data to address the relationship between climate changes and rice production in Bangladesh by estimating predictor variables, i.e., average rainfall, maximum temperature, minimum temperature, and humidity. A generalized linear regression model sets up for each rice (Aush, Aman, Boro) with all the predictor variables. We used MCMC's Gibbs sampling to approximate marginal posterior distribution from the prior distribution to see the profound relationship between those predictor variables and the predicted variables (Aush, Aman, Boro). We also want to see, is there any impact of the storm that can modify the relationship between climate change variables and rice production in Bangladesh. This study designed as follows: first, we mentioned our research question in the methods section to address our findings. Then we formulated a generalized linear model (GLM) based on the research question, where appropriate response and predictor variables were picked from the collected data. We formulated Bayesian models from the GLM and provided a mathematical representation of the GLM and Bayesian model. Then described the data and procedure to show how we analyze the data to find the answers to our research questions. In the results section, we discussed our findings and presented our results graphically and in tabulated format. Finally, we present the conclusion of this study.

Methods:
This project research was studied based on two research questions.
1. Is there any relation between rice production and the climate changing variables? 2. Does storm modify the relationship rice production and the climate changing variables?
To answer those questions, we have set a generalized linear model (GLM) as follows: Let us consider, The GLM for discussing research question (1) 4) We assume all priors that we want to estimate using the MCMC method are normally distribution with mean is zero. The scale parameter ~(0.01,0.01) = 1/ 2 , from where we will find the variance ( 2 ). We assume model (3) and (4) are homogeneity of variances; that is, for every predictor variable, the

Response variables
Predictor variables variance of all ; = 1, 2, 3 are the same. We standardized the data to generate numerical values for the standardized data to apply the Gibbs sampling method. The standardized parameters are than transform to the original scale using R language. We named the standardized priors as: ; = 0,1 … … . . ,9 in the simulated graph.
We have collected the dataset from a database web portal, namely, 'kaggle' (www.kaggle.com). We picked the data to analyze using the model (1), (2), (3) and (4). After filtering our required variables from the data, we use R code to generate the jitter-boxplots. Figure-2 is showing the collected data that we are going to use in the explanatory data analysis to find answers to our research question.

Explanatory Data Analysis:
We import the data in R code. We were filtered the data by choosing avg_rainfall, max_temperature, min_temparature, aush, aman, boro, humidity, and storm. The 'storm' column was either 'yes' or 'no' in the original data. We manually converted the data as: 1 for yes, and 0 for no. Then we standardize the data and renamed as: avg_rainfallStd, max_temperatureStd, min_temparatureStd, aushStd, amanStd, boroStd, and humidityStd, using the formula: Where, Y = {asu, aman, boro} and X= {avg_rainfall, max_temperature, min_temperature, humidity}.
After standardizing the variables and parameters, we ran 'JAGS' in R for the Gibbs sampling method. We finally reported our findings based on the marginal posterior distribution and high-density interval (HDI).
In Table-2, we will see an effective sample size (ESS) to observe how much independent information there in the autocorrelated chains. Next, we will also observe the potential scale reduction factor, the shrinkage factor to see the convergent target distribution. We used three chains for each MCMC chain iterations and presented the marginal posterior distribution plots, we will observe the relationship between response variables and the credible predictor variables in the marginal posterior distribution plot.

Results:
Climate change in Bangladesh always affects rice production. From ancient times, farmers of this area implemented their methods to produce rice more that they can feed their families and pay taxes to the king. Aush and Aman have a long history of cultivation in facing different claimants for more than a century. The cultivation of Boro comparatively new. An alternative and weather-friendly rice are Boro. It does not need that much water and also produces more rice than Aush and Aman. Figures 3 and 4 show the marginal posterior distribution plot for the Aush rice model in equation (1) and the 90% HDI of this posterior distribution model. Both plots show that the minimum temperature and humidity are positively related to producing this rice in Bangladesh between 2008 to 2017. However, after introducing the 'storm' interaction with climate data, the marginal posterior distribution with storm interaction and the 90% HDI of the posterior distribution of the model shows that storm effects modifying the relationship of production this rice in Bangladesh with the climate changing factors. The minimum temperature and humidity are positively related to producing this rice before interacting with the storm data. However, after interacting with the storm, the storm's minimum temperature negatively affected producing this rice. Humidity with the storm is showing a positive relationship with this rice production during these years. The average rainfall and maximum temperature, 90% HDI include zero before and after interaction on the marginal posterior distribution. We cannot get enough information from these parameters to produce this rice from 2008 to 2017 in Bangladesh. (1) and the 90% HDI of this posterior distribution model. Like Aush rice, both plots show that the minimum temperature and humidity are positively related to producing Aman rice in Bangladesh between 2008 to 2017. However, after introducing the 'storm' interaction with climate data, the marginal posterior distribution with storm interaction shows that the storm affects modifying the relationship of production Aman rice with the climate changing factors in Bangladesh during these years. The maximum temperature had no relation with producing this rice before interacting with the storm data. However, after interacting with the storm, the storm's maximum temperature negatively affected producing this rice. Average rainfall, the minimum temperature, and humidity with storm show no relationship with the Aman rice-producing because 90% HDI includes zero on the posterior distribution.

Discussion:
Our study looked at the relationship between climate change and rice production in Bangladesh. To do this, we organized the study into two levels: One, measurement of the four major causes of climate change -average rainfall, maximum temperature, minimum temperature, and humidity data to see the relationship of the three primary rice production in Bangladesh, which are Aus, Aman, and Boro. Two, since severe storms each year wreak havoc in the country's coastal areas, it is essential to look at the modified statistical relationship between these four significant climate change measures and the three primary rice production that causes by the storm.
To review the first and second relationships, we set up three linear regression models for three rice, where the same independent variables exist as the climate measurer. We have used Bayesian analysis, a robust statistical approach, to analyze our models. Where we performed three MCMC chains with Gibbs sampling method. For each iteration, our burn-in step was 2000, and for each chain, total iteration was 10,000, which means that by running a total of 30,000 iterations, we first saw some variables in the posterior distribution giving an idea of the relationship between climate change and rice production in Bangladesh. We have seen through 90% of the HDI that some variables do not fall into the zero lines. We have determined the variables based on either positive or negative relationships that speak to rice production. We looked at the number of effective sample sizes (ESS) to see if these variables were determined correctly. Then we saw the scale reduction factor (ACF) to see the convergency.
From Table 2 and 3 we see that our variable determination was correct for Aus, Aman, and Boro's conclusions. From the posterior distribution graphs, we find that the minimum temperature and humidity have played a valuable role in the paddy produced from 2008 to 2017. Our analysis did not get any solid idea from the average rainfall and maximum temperature of any paddy production that these two variables played any role in Bangladesh's paddy production during these times.   trend analysis and found summer crop Aush has impact on temperature, and so on. Our research focuses on accuracy. Based on the data obtained in the standard data analysis, only linear regression models have been used to comment on which variables are related to rice production. Our study has done a Bayesian analysis to show which variables are conducive to climate change. We also confirmed the convergence through a total of 30,000 iterations and its target distribution and then concluded. Therefore, our research will play a valuable role in the proper planning of rice production in Bangladesh by facing climate change.
We acknowledge here that it would not be appropriate to make a complete plan by looking at the relationship between rice production and the effects of storms on the four variables of climate change. It requires a comprehensive analysis of some more variables. As such, it is analyzing soil fertility is one of the crucial components of paddy production. At the same time, the chemical composition of the soil is changing with climate change. Subsequent studies can be seen by analyzing all these components and the data obtained.

Conclusion:
In this project study, we analyzed publicly available agricultural data on rice production in Bangladesh between 2008 to 2017 to address the relationship between climate changes and rice production in Bangladesh by estimating predictor variables, i.e., average rainfall and maximum temperature, minimum temperature, and humidity. A generalized linear regression model sets up for each rice with the climate variables. We used MCMC's Gibbs sampling on the collected data to approximate marginal posterior distribution from the prior distribution to see the profound relationship between those predictor variables and the predicted variables. We also saw whether any storm's impact could modify the relationship between climate change variables and rice production in Bangladesh. We have found all rice has a positive relation with humidity and minimum temperature. We did not find any significant importance of average rainfall and maximum temperature in producing all three rice when there is no storm involve. However, involving storm impacts the relationship between rice and climate variables. After interacting with the storm, the storm's minimum temperature negatively affected producing Aush rice in Bangladesh between 2008 to 2017. Humidity with the storm had a positive relationship with this rice production during these years. The storm's maximum temperature negatively affected producing Aman rice, and the rest of all other variables did not affect during these years in producing Aman rice. Furthermore, the storm did not modify the relationship in producing Boro rice in Bangladesh during these years.