Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

I attached the instruction file as word file and raw data exceel. XXXXXXXXXXSubmit Excel (With analysis sheet) and Word file as per instruction.

2 answer below »
Title Page
        Effects of climate change on global food production under SRES emissions and socio-economic scenarios
        Data set developed by Ana Iglesias of Universidad Politecnica de Madrid and Cynthia Rosenzweig of the NASA Goddard Institute for Space Studies and disseminated by the NASA Socioeconomic Data and Applications Center (SEDAC), managed by CIESIN at Columbia University
        March 2010
        http:
sedac.ciesin.columbia.edu/mva/cropclimate
        Data Description
        In the coming decades the agricultural sector faces many challenges stemming from growing global populations, land degradation, and loss of cropland to u
anization. Although food production has been able to keep pace with population growth on the global scale, periodically there are serious regional deficits, and poverty related nutritional deficiencies affect close to a billion people globally. In this century climate change is one factor that could affect food production and availability in many parts of the world, particularly those most prone to drought and famine.
        The purpose of this data set is to provide an assessment of potential climate change impacts on world staple crop production (wheat, rice, and maize) with a focus on quantitative estimates of yield changes based on multiple climate scenario runs. The data set assesses the implications of temperature and precipitation changes for world crop yields taking into account uncertainty in the level of climate change expected and physiological effects of ca
on dioxide on plant growth. Adaptation is explicitly considered and incorporated into the results by assessing the country or regional potential for reaching optimal crop yield. Optimal yield is the potential yield non limited by water, fertilizer, and without management constraints. Adapted yields are evaluated in each country as a fraction of the potential yield. The weighting factor combines the ratio of cu
ent yields to cu
ent yield potential and the economic limitation of the economic country’s agricultural systems.
        The baseline year for crop yield changes is the average yield simulated under cu
ent climate XXXXXXXXXXbaseline). The resulting yield change data were then fed into trade models to assess impacts on prices and overall food production. (Please note that total production changes need to be treated with caution, since production is determined by many factors.) The overall objective is to calculate quantitative estimates of climate change impacts on the amount of food produced globally, and to determine the consequences to world food prices and the number of people at risk of hunger.
        This data set is an update to a major crop modeling study by the NASA Goddard Institute for Space Studies (GISS). The initial study was published in 1997, based on output of HadCM2 model forced with greenhouse gas concentration from the IS95 emission scenarios in 1997. Results of the initial study are presented at SEDAC's Potential Impacts of Climate Change on World Food Supply: Data Sets from a Major Crop Modeling Study, released in 2001. The co-authors developed and tested a method for investigating the spatial implications of climate change on crop production. The Decision Support System for Agrotechnology Transfer (DSSAT) dynamic process crop growth models, are specified and validated for one hundred and twenty seven sites in the major world agricultural regions. Results from the crop models, cali
ated and validated in the major crop-growing regions, are then used to test functional forms describing the response of yield changes in the climate and environmental conditions. This updated version is based on HadCM3 model output along with GHG concentrations from the Special Report on Emissions Scenarios (SRES). The crop yield estimates incorporate some major improvements: 1) consistent crop simulation methodology and climate change scenarios; 2) weighting of model site results by contribution to regional and national, and rainfed and i
igated production; 3) quantitative foundation for estimation of physiological CO2 effects on crop yields; and 4) Adaptation is explicitly considered.
        This work links biophysical and statistical models in a rigorous and testable methodology, based on cu
ent understanding of processes of crop growth and development. The validated site crop models are useful for simulating the range of conditions under which crops are grown in the world, and provide the means to estimate production functions when experimental field data are not available. The derived functions are appropriate for application in global environmental change studies because they incorporate responses to higher temperatures, changed hydrological regimes, and higher levels of atmospheric CO2. Variables explaining a significant proportion of simulated yield variance in the cu
ent climate are crop water (sum of precipitation and i
igation) and temperature during the growing season.
        Data Set Citation
        Iglesias, Ana, and Cynthia Rosenzweig XXXXXXXXXXEffects of Climate Change on Global Food Production under Special Report on Emissions Scenarios (SRES) Emissions and Socioeconomic Scenarios: Data from a Crop Modeling Study. Palisades, NY: Socioeconomic Data and Applications Center (SEDAC), Columbia University. Available at http:
sedac.ciesin.columbia.edu/mva/cropclimate/ (date of download)
        References
        Pa
y, M.L., Fischer, C., Livermore, M., Rosenzweig, C., Iglesias, A., 1999. Climate change and world food security: a new assessment. Global Environmental Change 9, 51–67
        Pa
y, M.L., Rosenzweig, C., Iglesias, A., Livermore, M., Fischer, C., 2004. Effect of climate change on global food production under SRES emissions and socio-economic scenarios. Global Environmental Change 14, 53–67
        Rosenzweig, C., and A. Iglesias XXXXXXXXXXPotential Impacts of Climate Change on World Food Supply: Data Sets from a Major Crop Modeling Study, Palisades, NY: Socioeconomic Data and Applications Center, Columbia University. Available at http:
sedac.ciesin.columbia.edu/giss_crop_study/index.html
        Rosenzweig, C., M. L. Pa
y, G. Fischer, and K. Frohberg XXXXXXXXXXClimate change and world food supply. Research Report No. 3. Oxford: University of Oxford, Environmental Change Unit.
Data Dictionary
    Data filenames    Example    Description
    BLS_2_Countries_(SRES)_ABBREVNAME    Australia    country name
    Fips_code    AS    country code
    WH_2000    20,069,730    wheat production average 2000 to 2006 in t (FAO)
    RI_2000    891,259    rice production average 2000 to 2006 in t (FAO)
    MZ_2000    367,102    maize production average 2000 to 2006 in t (FAO)
    WHA1F2020     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A1FI 2020 scenario
    RIA1F2020    0.542    rice yield change (%) from baseline under the SRES A1FI 2020 scenario
    MZA1F2020     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A1FI 2020 scenario
    ActChWHA1F2020     XXXXXXXXXX    wheat total production changes in 2020 applying the SRES A1FI 2020 scenario yield change to the 1990 production
    ActChRIAIF2020     XXXXXXXXXX    rice total production changes in 2020 applying the SRES A1FI 2020 scenario yield change to the 1990 production
    ActChMZA1F2020     XXXXXXXXXX    maize total production changes in 2020 applying the SRES A1FI 2020 scenario yield change to the 1990 production
    WHA1F2050     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A1FI 2050 scenario
    RIA1F2050    6.054    rice yield change (%) from baseline under the SRES A1FI 2050 scenario
    MZA1F2050     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A1FI 2050 scenario
    ActChWHA1F2050     XXXXXXXXXX    wheat total production changes in 2050 applying the SRES A1FI scenario yield change to the 1990 production
    ActChRIAIF2050     XXXXXXXXXX    rice total production changes in 2050 applying the SRES A1FI scenario yield change to the 1990 production
    ActChMZA1F2050     XXXXXXXXXX    maize total production changes in 2050 applying the SRES A1FI scenario yield change to the 1990 production
    WHA1F2080     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A1FI 2080 scenario
    RIA1F2080    8.95    rice yield change (%) from baseline under the SRES A1FI 2080 scenario
    MZA1F2080     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A1FI 2080 scenario
    ActChWHA1F2080     XXXXXXXXXX    wheat total production changes in 2080 applying the SRES A1FI scenario yield change to the 1990 production
    ActChRIAIF2080     XXXXXXXXXX    rice total production changes in 2080 applying the SRES A1FI scenario yield change to the 1990 production
    ActChMZA1F2080     XXXXXXXXXX    maize total production changes in 2080 applying the SRES A1FI scenario yield change to the 1990 production
    WHA2a2020     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A2a 2020 scenario
    RIA2a2020    0.605    rice yield change (%) from baseline under the SRES A2a 2020 scenario
    MZA2a2020     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A2a 2020 scenario
    ActChWHA2a2020     XXXXXXXXXX    wheat total production changes in 2020 applying the SRES A2a 2020 scenario yield change to the 1990 production
    ActChRIA2a2020     XXXXXXXXXX    rice total production changes in 2020 applying the SRES A2a 2020 scenario yield change to the 1990 production
    ActChMZA2a2020     XXXXXXXXXX    maize total production changes in 2020 applying the SRES A2a 2020 scenario yield change to the 1990 production
    WHA2a2050     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A2a 2050 scenario
    RIA2a2050    4.342    rice yield change (%) from baseline under the SRES A2a 2050 scenario
    MZA2a2050     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A2a 2050 scenario
    ActChWHA2a2050     XXXXXXXXXX    wheat total production changes in 2050 applying the SRES A2a 2050 scenario yield change to the 1990 production
    ActChRIA2a2050     XXXXXXXXXX    rice total production changes in 2050 applying the SRES A2a 2050 scenario yield change to the 1990 production
    ActChMZA2a2050     XXXXXXXXXX    maize total production changes in 2050 applying the SRES A2a 2050 scenario yield change to the 1990 production
    WHA2a2080     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A2a 2080 scenario
    RIA2a2080    10.645    rice yield change (%) from baseline under the SRES A2a 2080 scenario
    MZA2a2080     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A2a 2080 scenario
    ActChWHA2a2080     XXXXXXXXXX    wheat total production changes in 2080 applying the SRES A2a 2080 scenario yield change to the 1990 production
    ActChRIA2a2080     XXXXXXXXXX    rice total production changes in 2080 applying the SRES A2a 2080 scenario yield change to the 1990 production
    ActChMZA2a2080     XXXXXXXXXX    maize total production changes in 2080 applying the SRES A2a 2080 scenario yield change to the 1990 production
    WHA2b2020     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A2b 2020 scenario
    RIA2b2020    0.073    rice yield change (%) from baseline under the SRES A2b 2020 scenario
    MZA2b2020     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A2b 2020 scenario
    ActCHWHA2b2020     XXXXXXXXXX    wheat total production changes in 2020 applying the SRES A2b 2020 scenario yield change to the 1990 production
    ActChRIA2b2020     XXXXXXXXXX    rice total production changes in 2020 applying the SRES A2b 2020 scenario yield change to the 1990 production
    ActChMZA2b2020     XXXXXXXXXX    maize total production changes in 2020 applying the SRES A2b 2020 scenario yield change to the 1990 production
    WHA2b2050     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A2b 2050 scenario
    RIA2b2050    4.419    rice yield change (%) from baseline under the SRES A2b 2050 scenario
    MZA2b2050     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A2b 2050 scenario
    ActCHWHA2b2050     XXXXXXXXXX    wheat total production changes in 2050 applying the SRES A2b 2050 scenario yield change to the 1990 production
    ActChRIA2b2050     XXXXXXXXXX    rice total production changes in 2050 applying the SRES A2b 2050 scenario yield change to the 1990 production
    ActChMZA2b2050     XXXXXXXXXX    maize total production changes in 2050 applying the SRES A2b 2050 scenario yield change to the 1990 production
    WHA2b2080     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A2b 2080 scenario
    RIA2b2080    11.442    rice yield change (%) from baseline under the SRES A2b 2080 scenario
    MZA2b2080     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A2b 2080 scenario
    ActChWHA2b2080     XXXXXXXXXX    wheat total production changes in 2080 applying the SRES A2b 2080 scenario yield change to the 1990 production
    ActChRIA2b2080     XXXXXXXXXX    rice total production changes in 2080 applying the SRES A2b 2080 scenario yield change to the 1990 production
    ActChMZA2b2080     XXXXXXXXXX    maize total production changes in 2080 applying the SRES A2b 2080 scenario yield change to the 1990 production
    WHA2c2020     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A2c 2020 scenario
    RIA2c2020    0.437    rice yield change (%) from baseline under the SRES A2c 2020 scenario
    MZA2c2020     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A2c 2020 scenario
    ActChWHA2c2020     XXXXXXXXXX    wheat total production changes in 2020 applying the SRES A2c 2020 scenario yield change to the 1990 production
    ActChRIA2c2020     XXXXXXXXXX    rice total production changes in 2020 applying the SRES A2c 2020 scenario yield change to the 1990 production
    ActChMZA2c2020     XXXXXXXXXX    maize total production changes in 2020 applying the SRES A2c 2020 scenario yield change to the 1990 production
    WHA2c2050     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A2c 2050 scenario
    RIA2c2050    4.986    rice yield change (%) from baseline under the SRES A2c 2050 scenario
    MZA2c2050     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A2c 2050 scenario
    ActChWHA2c2050     XXXXXXXXXX    wheat total production changes in 2050 applying the SRES A2c 2050 scenario yield change to the 1990 production
    ActChRIA2c2050     XXXXXXXXXX    rice total production changes in 2050 applying the SRES A2c 2050 scenario yield change to the 1990 production
    ActChMZA2c2050     XXXXXXXXXX    maize total production changes in 2050 applying the SRES A2c 2050 scenario yield change to the 1990 production
    WHA2c2080     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES A2c 2080 scenario
    RIA2c2080    10.736    rice yield change (%) from baseline under the SRES A2c 2080 scenario
    MZA2c2080     XXXXXXXXXX    maize yield change (%) from baseline under the SRES A2c 2080 scenario
    ActChWHA2c2080     XXXXXXXXXX    wheat total production changes in 2080 applying the SRES A2c 2080 scenario yield change to the 1990 production
    ActChRIA2c2080     XXXXXXXXXX    rice total production changes in 2080 applying the SRES A2c 2080 scenario yield change to the 1990 production
    ActChMZA2c2080     XXXXXXXXXX    maize total production changes in 2080 applying the SRES A2c 2080 scenario yield change to the 1990 production
    WHB1a2020     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES B1a 2020 scenario
    RIB1a2020    -0.171    rice yield change (%) from baseline under the SRES B1a 2020 scenario
    MZB1a2020     XXXXXXXXXX    maize yield change (%) from baseline under the SRES B1a 2020 scenario
    ActChWHB1a2020     XXXXXXXXXX    wheat total production changes in 2020 applying the SRES B1a 2020 scenario yield change to the 1990 production
    ActChRIB1a2020     XXXXXXXXXX    rice total production changes in 2020 applying the SRES B1a 2020 scenario yield change to the 1990 production
    ActChMZB1a2020     XXXXXXXXXX    maize total production changes in 2020 applying the SRES B1a 2020 scenario yield change to the 1990 production
    WHB1a2050     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES B1a 2050 scenario
    RIB1a2050    2.197    rice yield change (%) from baseline under the SRES B1a 2050 scenario
    MZB1a2050     XXXXXXXXXX    maize yield change (%) from baseline under the SRES B1a 2050 scenario
    ActChWHB1a2050     XXXXXXXXXX    wheat total production changes in 2050 applying the SRES B1a 2050 scenario yield change to the 1990 production
    ActChRIB1a2050     XXXXXXXXXX    rice total production changes in 2050 applying the SRES B1a 2050 scenario yield change to the 1990 production
    ActChMZB1a2050     XXXXXXXXXX    maize total production changes in 2050 applying the SRES B1a 2050 scenario yield change to the 1990 production
    WHB1a2080     XXXXXXXXXX    wheat yield change (%) from baseline under the SRES B1a 2080 scenario
    RIB1a2080    1.16    rice yield change (%) from baseline under the SRES B1a 2080 scenario
    MZB1a2080     XXXXXXXXXX    maize yield change (%) from baseline under the SRES B1a 2080 scenario
    ActChWHB1a2080     XXXXXXXXXX    wheat total production changes in 2080 applying the SRES B1a 2080 scenario yield change to the 1990 production
    ActChRIB1a2080     XXXXXXXXXX    rice total production changes in 2080 applying the SRES B1a 2080 scenario yield change to the 1990 production
    ActChMZB1a2080     XXXXXXXXXX    maize total production changes in 2080 applying the SRES B1a
Answered 4 days After Nov 30, 2023

Solution

Pratibha answered on Dec 04 2023
18 Votes
Predictive Analysis Project Instructions
Project: Investigate the effect of climate on food supply – 2050 and 2080 on the basis of 2000 and 2020
Questions:
-How historical climate changes impacted food production?( Do-Time Series Analysis)
-How are projected climate changes likely to impact food production in the future?(Do: Regression)
-What are the most vulnerable regions and populations? (Do -Spatial analysis)
-What adaptation and mitigation strategies can be implemented to reduce the risks to food security? Do - logistics regression)
1.Data preparation: How many row and column, and variable. How may you remove to balancing the data. Give Histogram
· Data has 157 variables with 167 observations. I have used a dataset that contains information related to the growth rates of wheat (WH), rice (RI), and maize (MZ) for the years 2000, 2020, 2050, and 2080. The dataset also includes variables such as WHA1F2050, WH_2000, RI_2000, MZ_2000, WHAIF2020, WHAIF2080, RIA1F2020, RIA1F2050, RIA1F2080, MZA1F2020, MZA1F2050, MZA1F2080, BLS_2_Countries_(SRES)_ABBREVNAME, WH%GR, RI%GR, MZ%GR, WH_growth_2020_2080, WHpercentGR, WHB1a2050, WHB1a2080, WHA1F2020, WHA1F2080, WHA1F2050, ActChWHA1F2050, ActChWHA1F2020, ActChWHA1F2080, RI_growth_2020_2080, RIB1a2050, RIB1a2080, RIA1F2020, RIA1F2080, RIA1F2050, ActChRIA1F2050, ActChRIA1F2020, ActChRIA1F2080, MZ_growth_2020_2080, MZpercentGR, MZB1a2050, MZB1a2080, MZA1F2020, MZA1F2080, MZA1F2050, ActChMZA1F2050, ActChMZA1F2020, ActChMZA1F2080.
· The data quality is not too good, and data preprocessing is required. Issues with the data are as follows:
· Missing values
· Inco
ect data types, and
· Variable name issues (for e.g., MG%GR, % is the issue and caused e
or during modelling)
Data preparation:
· Changed variable names for e.g RI%GR to RipercentGR,
· Ensuring that data types are appropriate for the type of data and analysis is important. Changed datatypes of variables, character to numeric and factor.
· Imputed the missing values by average values of the variables
· Created Variables for growth from the year 2000 to 2080, by using available Variables, and Formulas as shown below:
· # Calculate growth rates for WH, RI, and MZ from 2000 to 2050
df$WH_growth_2000_2050 <- (df$WHA1F2050 - df$WH_2000) / df$WH_2000
df$RI_growth_2000_2050 <- (df$RIA1F2050 - df$RI_2000) / df$RI_2000
df$MZ_growth_2000_2050 <- (df$MZA1F2050 - df$MZ_2000) / df$MZ_2000
· # Calculate growth rates for WH, RI, and MZ from 2020 to 2080
df$WH_growth_2000_2080 <- (df$WHA1F2080 - df$WH_2000) / df$WH_2000
df$RI_growth_2000_2080 <- (df$RIA1F2080 - df$RI_2000) / df$RI_2000
df$MZ_growth_2000_2080 <- (df$MZA1F2080 - df$MZ_2000) / df$MZ_2000
· # Calculate growth rates for WH, RI, and MZ from 2000 to 2050
df$WH_growth_2020_2050 <- (df$WHA1F2050 - df$WHA1F2020) / df$WHA1F2020
df$RI_growth_2020_2050 <- (df$RIA1F2050 - df$RIA1F2020) / df$RIA1F2020
df$MZ_growth_2020_2050 <- (df$MZA1F2050 - df$MZA1F2020) / df$MZA1F2020
· # Calculate growth rates for WH, RI, and MZ from 2020 to 2080
df$WH_growth_2020_2080 <- (df$WHA1F2080 - df$WHA1F2020) / df$WHA1F2020
df$RI_growth_2020_2080 <- (df$RIA1F2080 - df$RIA1F2020) / df$RIA1F2020
df$MZ_growth_2020_2080 <- (df$MZA1F2080 - df$MZA1F2020) / df$MZA1F2020
Histogram:
Histogram of all Variables has been plotted:
Selected Few Variables (Around 15 Variables) and Plotted The histogram
2. Modeling:
Model implementation : Three crops( wheat , Rice, Maize)
A.    Time series
# Plot multiple time series separately
for (i in 1:ncol(data_ts)) {
plot(data_ts[, i], type = 'l', main = colnames(data_ts)[i],
xlab = "Year", ylab = "Value")
}
# Plot the time series data
#plot(data_ts, main = "Time Series Data", xlab = "Year", ylab = "Value")
# Plot the time series data
#plot(data_ts, main = "Wheat, Rice, and Maize Growth Over Time",
# ylab = "Growth", xlab = "Year", col = 1:ncol(df_selected))
# Extract the growth percentage columns for each crop
wheat_column <- df_selected$WHpercentGR
ice_column <- df_selected$RIpercentGR
maize_column <- df_selected$MZpercentGR
# Combine the columns into a matrix or data frame
combined_data <- data.frame(wheat_column, rice_column, maize_column)
# Convert the combined data into a time series
data_ts <- ts(combined_data, start = c(2000),end=c(2080), frequency = 1)
# Plot the time series data
plot(data_ts, main = "Wheat, Rice, and Maize Growth Over Time",
ylab = "Growth", xlab = "Year", col = 1:ncol(combined_data))
# Set hypotheses for each crop
# Hypothesis for Wheat: The wheat growth is expected to increase over time.
# Hypothesis for Rice: The rice growth follows a stable pattern without significant fluctuations.
# Hypothesis for Maize: The maize growth exhibits seasonal variations and an overall increasing trend.
# Fit ARIMA models for each crop (Example with ARIMA(1,0,1) model)
li
ary(forecast)
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
# Wheat ARIMA model
wheat_arima <- auto.arima(wheat_column)
summary(wheat_arima)
## Series: wheat_column
## ARIMA(1,0,1) with non-zero mean
##
## Coefficients:
## ar1 ma1 mean
## 0.0217 0.0817 34.9401
## s.e. 0.4892 0.4843 3.3443
##
## sigma^2 = 1549: log likelihood = -843.67
## AIC=1695.35 AICc=1695.6 BIC=1707.8
##
## Training set e
or measures:
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set -0.0241684 38.99381 35.02552 -Inf Inf 0.9005648 4.855697e-05
# Rice ARIMA model
ice_arima <- auto.arima(rice_column)
summary(rice_arima)
## Series: rice_column
## ARIMA(0,0,0) with non-zero mean
##
## Coefficients:
## mean
## 24.4027
## s.e. 2.6777
##
## sigma^2 = 1197: log likelihood = -823.34
## AIC=1650.69 AICc=1650.76 BIC=1656.91
##
## Training set e
or measures:
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set -1.210429e-15 34.50007 28.80044 -Inf Inf 0.8783524 0.03113128
# Maize ARIMA model
maize_arima <- auto.arima(maize_column)
summary(maize_arima)
## Series: maize_column
## ARIMA(0,0,0) with non-zero mean
##
## Coefficients:
## mean
## 35.3607
## s.e. 2.6758
##
## sigma^2 = 1196: log likelihood = -823.23
## AIC=1650.45 AICc=1650.52 BIC=1656.67
##
## Training set e
or measures:
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set 5.966523e-12 34.47548 30.41014 -Inf Inf 0.7650439 -0.05437934
# Forecast for the next 12 months (adjust as needed)
wheat_forecast <- forecast(wheat_arima, h = 12)
ice_forecast <- forecast(rice_arima, h = 12)
maize_forecast <- forecast(maize_arima, h = 12)
# Plot the forecasts
plot(wheat_forecast, main = "Wheat Growth Forecast")
plot(rice_forecast, main = "Rice Growth Forecast")
plot(maize_forecast, main = "Maize Growth Forecast")
B.    Regression
Wheat Analysis:
Wheat Growth Prediction:
Null Hypothesis (H₀): There is no significant linear relationship between various factors and wheat growth.
Alternative Hypothesis (H₁): At least one of the predictor variables has a significant linear relationship with wheat growth.
# Load necessary li
aries
li
ary(caret)
df1 <- subset(df, select = c(WH_growth_2000_2050,WH_growth_2020_2080,WH_growth_2000_2080,WH_growth_2020_2050, WHpercentGR, WHB1a2050, WHB1a2080, WHA1F2020, WHA1F2080, WHA1F2050, ActChWHA1F2050, ActChWHA1F2020, ActChWHA1F2080))
df1 <- subset(df, select = c(WH_growth_2020_2080, WHpercentGR, WHB1a2050, WHB1a2080, WHA1F2020, WHA1F2080, WHA1F2050, ActChWHA1F2050, ActChWHA1F2020, ActChWHA1F2080))
missing_values <- colSums(is.na(df1))
print(missing_values)
## WH_growth_2020_2080 WHpercentGR WHB1a2050 WHB1a2080
## 0 0 0 0
## WHA1F2020 WHA1F2080 WHA1F2050 ActChWHA1F2050
## 0 0 0 0
## ActChWHA1F2020 ActChWHA1F2080
## 0 0
# Remove rows with missing values
data_ts <- na.omit(df1)
# Check for infinite values
infinite_values <- apply(df1, 2, function(x) any(is.infinite(x)))
print(infinite_values)
## WH_growth_2020_2080 WHpercentGR WHB1a2050 WHB1a2080
## FALSE FALSE FALSE FALSE
## WHA1F2020 WHA1F2080 WHA1F2050 ActChWHA1F2050
## FALSE FALSE FALSE FALSE
## ActChWHA1F2020 ActChWHA1F2080
## FALSE FALSE
# Remove rows with infinite values
df1 <- df1[is.finite(rowSums(df1)), ]
set.seed(123) # For reproducibility
train_indices <- sample(1:nrow(df1), 0.75 * nrow(df)) # 70% train, 30% test
train_data <- df1[train_indices, ]
test_data <- df1[-train_indices, ]
dim(train_data)
## [1] 124 10
dim(test_data)
## [1] 42 10
# Train the linear regression model
set.seed(123)
wheat_model <- lm(WHpercentGR ~., data = train_data, ntree = 100)
print(wheat_model)
##
## Call:
## lm(formula = WHpercentGR ~ ., data = train_data, ntree = 100)
##
## Coefficients:
## (Intercept) WH_growth_2020_2080 WHB1a2050
## 6.150e+01 2.045e-01 8.334e+00
## WHB1a2080 WHA1F2020 WHA1F2080
## 1.153e+00 1.980e+00 2.299e+00
## WHA1F2050 ActChWHA1F2050 ActChWHA1F2020
## -8.933e+00 2.045e-06 -7.717e-06
## ActChWHA1F2080
## 6.133e-06
Rice Growth Prediction:
Null Hypothesis (H₀): The combined effect of all predictor variables does not significantly impact rice growth.
Alternative Hypothesis (H₁): The combination of at least some of the predictor variables has a significant linear relationship with rice growth.
# Fit the multiple linear regression model
dfRI <- subset(df, select = c(RI_growth_2000_2050, RI_growth_2020_2080, RI_growth_2000_2080, RI_growth_2020_2050, RIpercentGR, RIB1a2050, RIB1a2080, RIA1F2020, RIA1F2080, RIA1F2050, ActChRIAIF2050, ActChRIAIF2020, ActChRIAIF2080))
missing_values <- colSums(is.na(dfRI))
print(missing_values)
## RI_growth_2000_2050 RI_growth_2020_2080 RI_growth_2000_2080 RI_growth_2020_2050
## 0 0 0 0
## RIpercentGR RIB1a2050 RIB1a2080 RIA1F2020
## 0 0 0 0
## RIA1F2080 RIA1F2050 ActChRIAIF2050 ActChRIAIF2020
## 0 0 0 0
## ActChRIAIF2080
## 0
# Remove rows with missing values
dfRI <- na.omit(dfRI)
# Check for infinite values
infinite_values <- apply(dfRI, 2, function(x) any(is.infinite(x)))
print(infinite_values)
## RI_growth_2000_2050 RI_growth_2020_2080 RI_growth_2000_2080 RI_growth_2020_2050
## TRUE FALSE TRUE FALSE
## RIpercentGR RIB1a2050 RIB1a2080 RIA1F2020
## FALSE FALSE FALSE FALSE
## RIA1F2080 RIA1F2050 ActChRIAIF2050 ActChRIAIF2020
## FALSE FALSE FALSE FALSE
## ActChRIAIF2080
## FALSE
# Remove rows with infinite values
dfRI <- dfRI[is.finite(rowSums(dfRI)), ]
set.seed(123) # For reproducibility
train_indices <- sample(1:nrow(dfRI), 0.75 * nrow(df)) # 70% train, 30% test
train_data <- dfRI[train_indices, ]
test_data <- dfRI[-train_indices, ]
dim(train_data)
## [1] 124 13
dim(test_data)
## [1] 40 13
lm_modelRI <- lm(RIpercentGR ~ ., data = train_data)
print(lm_modelRI)
##
## Call:
## lm(formula = RIpercentGR ~ ., data = train_data)
##
## Coefficients:
## (Intercept) RI_growth_2000_2050 RI_growth_2020_2080
## 3.410e+03 3.808e+03 -4.032e-01
## RI_growth_2000_2080 RI_growth_2020_2050 RIB1a2050
## -4.342e+02 -4.026e+00 -8.465e+00
## RIB1a2080 RIA1F2020 RIA1F2080
## 2.625e+00 5.521e+00 -6.881e-01
## RIA1F2050 ActChRIAIF2050 ActChRIAIF2020
## 1.964e+00 7.148e-05 -2.050e-05
## ActChRIAIF2080
## -3.912e-05
Maize Growth Prediction: Null Hypothesis (H₀): There is no significant linear association between factors such as temperature variation, water availability, and maize growth. Alternative Hypothesis (H₁): At least one of the predictor variables shows a significant linear association with maize growth.
dfMZ <- subset(df, select = c(MZ_growth_2000_2050,MZ_growth_2020_2080,MZ_growth_2000_2080,MZ_growth_2020_2050, MZpercentGR, MZB1a2050, MZB1a2080, MZA1F2020, MZA1F2080, MZA1F2050, ActChMZA1F2050, ActChMZA1F2020, ActChMZA1F2080))
missing_values <- colSums(is.na(dfMZ))
print(missing_values)
## MZ_growth_2000_2050 MZ_growth_2020_2080 MZ_growth_2000_2080 MZ_growth_2020_2050
## 0 0 0 0
## MZpercentGR MZB1a2050 MZB1a2080 MZA1F2020
## 0 0 0 0
## MZA1F2080 MZA1F2050 ActChMZA1F2050 ActChMZA1F2020
## 0 0 0 0
## ActChMZA1F2080
## 0
# Remove rows with missing values
dfMZ <- na.omit(dfMZ)
# Check for infinite values
infinite_values <- apply(dfMZ, 2, function(x) any(is.infinite(x)))
print(infinite_values)
## MZ_growth_2000_2050 MZ_growth_2020_2080 MZ_growth_2000_2080 MZ_growth_2020_2050
## FALSE FALSE FALSE FALSE
## MZpercentGR MZB1a2050 MZB1a2080 MZA1F2020
## FALSE FALSE FALSE FALSE
## MZA1F2080 MZA1F2050 ActChMZA1F2050 ActChMZA1F2020
## FALSE FALSE FALSE FALSE
## ActChMZA1F2080
## FALSE
# Remove rows with infinite values
dfMZ <- dfMZ[is.finite(rowSums(dfMZ)), ]
set.seed(123) # For reproducibility
train_indices <- sample(1:nrow(dfMZ), 0.75 * nrow(df)) # 70% train, 30% test
train_data <- dfMZ[train_indices, ]
test_data <- dfMZ[-train_indices, ]
dim(train_data)
## [1] 124 13
dim(test_data)
## [1] 42 13
lm_modelMZ <- lm(MZpercentGR ~ ., data = train_data, ntree = 100)
print(lm_modelMZ)
##
## Call:
## lm(formula = MZpercentGR ~ ., data = train_data, ntree = 100)
##
## Coefficients:
## (Intercept) MZ_growth_2000_2050 MZ_growth_2020_2080
## 1.004e+02 1.900e+02 2.327e-01
## MZ_growth_2000_2080 MZ_growth_2020_2050 MZB1a2050
## -9.374e+01 -4.026e-01 -2.689e+00
## MZB1a2080 MZA1F2020 MZA1F2080
## -6.267e+00 4.601e+00 -1.394e+00
## MZA1F2050 ActChMZA1F2050 ActChMZA1F2020
## 5.583e+00 4.362e-07 -3.708e-06
## ActChMZA1F2080
## -4.672e-07
C.    Spatial Analysis
# Load necessary li
aries
li
ary(sf)
## Linking to GEOS 3.9.3, GDAL 3.5.2, PROJ 8.2.1; sf_use_s2() is TRUE
li
ary(ggplot2)
# Filter columns in crop_data
crop_data <- subset(df, select = c("BLS_2_Countries_(SRES)_ABBREVNAME", "Fips_code", "ISO3v10", "MZ_growth_2000_2050", "MZ_growth_2020_2080", "MZ_growth_2000_2080", "MZ_growth_2020_2050", "MZpercentGR"))
# Rename the column in crop_data to match the merging column in world_map
names(crop_data)[names(crop_data) == "BLS_2_Countries_(SRES)_ABBREVNAME"] <- "region"
# Simulated world map (for illustration)
world_map <-...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here