1. Introduction

Australia is currently the fifth largest exporter of wine in the world, with a total wine export value of around $2.6 billion. Around 811 million liters of wine are exported each year, with red wine capturing the majority share with 493 million liters. And all this is possible, largely in thanks to the climate of the continent that is conducive to growing a large variety of grapes (Foundation for National Parks & Wildlife 2020).

2. Background

In assignment 2B, our group have demonstrated a proof of concept linear regression model that predicts crop yield in Australia using geographical factors. Two best model were produced despite using very different feature selection methodologies. First one is research based indicated that grape yield varies with temperature. In warmer climates it is possible to ripen larger crops (tonnes/hectare) as there is more photosynthetic potential. Therefore, temperature in warmer season was the priority when choosing features for this model. The other model was run Elastic Net regression implemented in the glmnet package. This produced a very diverse range of features including growing area, pH, summer to Autumn rainfall, the amount of water used from various sources and presence of a range of red and white grape varieties.

3. Current Study

In this assignment, I am interested in below research question by using Structural equation modelling (SEM), which is a simultaneous measurement method:

Which environmental factors influences the most on grape productivity?

SEM is largely a multivariate extension of regression, in which we can examine many predictors and results at once. SEM also provides innovations to examine the underlying structure (ie situations where certain variables are not observed). More specifically, the concept of “structural equations” means that we have more than one equation representing a covariance structure model, in which we (usually) have multiple standard variables and multiple predictor variables (Michael,H 2018).

4. Dataset

The same dataset was used in this assignment, no new dataset was imported for this analysis. Data was collected from a range of publicly available sources and initial analysis was performed to determine the suitability for each set in the model. The response variable (crop yield) was recorded by the Australian Bureau of Statistics (ABS) as part of the 2015-2016 Agricultural Census. This dataset contains the area, production and yield for an extensive list of agricultural commodities. Data is recorded by Statistical Area Regions (SA2) which are standard geographical boundaries defined by the ABS based on population.

5. Analysis

5.1 Fit Indices

There are a lot of fit statistics researchers use to assess SEM models. Below indices are being used in this assignment: 1) The model chi-square 2) RMSEA 3) CFI 4) SRMR

5.2 Model 1

According to Howell (2001), Yield varies with temperature. In warmer climates it is possible to ripen larger crops (tonnes/hectare) as there is more photosynthetic potential. Therefore, For Model 1, I picked temperature and divided by winter and summer seasons. However, the result is not seems to be satisfying: with RMSEA 0.517 (which is much higher than 0.08), SRMR 0.151 (which is much higher than 0.08), cfi 0.833 (smaller than 0.9) and “0” p value. The reason may because the sample I picked is relatively small (Li-tze,H & Peter,M.B 2009).

##                npar                fmin               chisq                  df 
##              16.000               1.628             722.990              12.000 
##              pvalue      baseline.chisq         baseline.df     baseline.pvalue 
##               0.000            4284.275              21.000               0.000 
##                 cfi                 tli                nnfi                 rfi 
##               0.833               0.708               0.708               0.705 
##                 nfi                pnfi                 ifi                 rni 
##               0.831               0.475               0.834               0.833 
##                logl   unrestricted.logl                 aic                 bic 
##            -420.880             -59.385             873.760             928.203 
##              ntotal                bic2               rmsea      rmsea.ci.lower 
##             222.000             877.498               0.517               0.485 
##      rmsea.ci.upper        rmsea.pvalue                 rmr          rmr_nomean 
##               0.549               0.000               0.150               0.150 
##                srmr        srmr_bentler srmr_bentler_nomean                crmr 
##               0.151               0.151               0.151               0.174 
##         crmr_nomean          srmr_mplus   srmr_mplus_nomean               cn_05 
##               0.174               0.151               0.151               7.456 
##               cn_01                 gfi                agfi                pgfi 
##               9.050               0.722               0.352               0.309 
##                 mfi                ecvi 
##               0.202               3.401
## lavaan 0.6-7 ended normally after 119 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of free parameters                         16
##                                                       
##   Number of observations                           222
##                                                       
## Model Test User Model:
##                                                       
##   Test statistic                               722.990
##   Degrees of freedom                                12
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                         Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   summer_temperature =~                                                      
##     lu_mean_tmp_jn         1.000                               1.001    1.003
##     lu_mean_tmp_dc         0.984    0.009  110.012    0.000    0.986    0.988
##     lu_mean_tmp_fb         0.988    0.007  145.332    0.000    0.989    0.992
##   winter_temperature =~                                                      
##     lu_mean_tmp_jl         1.000                               0.960    0.962
##     lu_mean_temp_g         1.060    0.015   70.280    0.000    1.018    1.020
##     lu_mean_tmp_sp         0.983    0.029   34.124    0.000    0.943    0.946
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   yield ~                                                               
##     summer_temprtr    0.264    0.069    3.840    0.000    0.264    0.265
##     winter_temprtr    0.065    0.064    1.014    0.311    0.062    0.063
## 
## Covariances:
##                         Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   summer_temperature ~~                                                      
##     winter_temprtr         0.438    0.067    6.527    0.000    0.456    0.456
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .lu_mean_tmp_jn   -0.007    0.001   -6.773    0.000   -0.007   -0.007
##    .lu_mean_tmp_dc    0.024    0.002   10.091    0.000    0.024    0.024
##    .lu_mean_tmp_fb    0.017    0.002    9.578    0.000    0.017    0.017
##    .lu_mean_tmp_jl    0.074    0.007   10.478    0.000    0.074    0.074
##    .lu_mean_temp_g   -0.040    0.004   -9.073    0.000   -0.040   -0.040
##    .lu_mean_tmp_sp    0.106    0.010   10.784    0.000    0.106    0.106
##    .yield             0.907    0.086   10.562    0.000    0.907    0.911
##     summer_temprtr    1.002    0.094   10.607    0.000    1.000    1.000
##     winter_temprtr    0.922    0.094    9.783    0.000    1.000    1.000
##  rmsea   srmr    cfi pvalue 
##  0.517  0.151  0.833  0.000
##                    l_mn_tmp_jn l_mn_tmp_d l_mn_tmp_f l_mn_tmp_jl l_mn_tmp_g
## lu_mean_temp_jan   1.000                                                   
## lu_mean_temp_dec   0.991       1.000                                       
## lu_mean_temp_feb   0.995       0.980      1.000                            
## lu_mean_temp_jul   0.440       0.433      0.435      1.000                 
## lu_mean_temp_aug   0.466       0.459      0.461      0.981       1.000     
## lu_mean_temp_sep   0.432       0.426      0.427      0.910       0.964     
## yield              0.295       0.290      0.291      0.176       0.187     
## summer_temperature 1.003       0.988      0.992      0.439       0.465     
## winter_temperature 0.457       0.450      0.452      0.962       1.020     
##                    l_mn_tmp_s yield smmr_t wntr_t
## lu_mean_temp_jan                                 
## lu_mean_temp_dec                                 
## lu_mean_temp_feb                                 
## lu_mean_temp_jul                                 
## lu_mean_temp_aug                                 
## lu_mean_temp_sep   1.000                         
## yield              0.173      1.000              
## summer_temperature 0.431      0.294 1.000        
## winter_temperature 0.946      0.183 0.456  1.000
##                  l_mn_tmp_jn l_mn_tmp_d l_mn_tmp_f l_mn_tmp_jl l_mn_tmp_g
## lu_mean_temp_jan 1.000                                                   
## lu_mean_temp_dec 0.991       1.000                                       
## lu_mean_temp_feb 0.995       0.977      1.000                            
## lu_mean_temp_jul 0.570       0.587      0.583      1.000                 
## lu_mean_temp_aug 0.671       0.698      0.677      0.976       1.000     
## lu_mean_temp_sep 0.792       0.832      0.784      0.890       0.962     
## yield            0.288       0.265      0.291      0.175       0.211     
##                  l_mn_tmp_s yield
## lu_mean_temp_jan                 
## lu_mean_temp_dec                 
## lu_mean_temp_feb                 
## lu_mean_temp_jul                 
## lu_mean_temp_aug                 
## lu_mean_temp_sep 1.000           
## yield            0.242      1.000

5.3 Model 2

Therefore, in my next attempt model 2, I put more variables, which includes: mean temperature for December, January and February; mean rainfall for December, January and February; irrigation. I also put residual correlation for mean temperature December to February with mean rainfall December to February. The result for this model is slightly better than the first one especially for CFI 0.944, which is greater than 0.08. However, for RMSEA 0.206, which is still higher than 0.08, SRMR 0.206 that is still higher than 0.08 and pvalue is 0.

I also used inspect() function in lavaan to show more detail of the details. According to Michael.H (2018), Large positive values indicate the model underpredicts the correlation; large negative values suggest overprediction of correlation. Usually values |r>.1| are worth closer consideration. In the result table, I found that mean rainfall in December and February has good correlation with rainfall compare with other months.

## 
##   # latent variable model
##     summer_temperature =~ lu_mean_temp_jan + 
##                           lu_mean_temp_dec + 
##                           lu_mean_temp_feb
##     
##     rainfall =~ lu_mean_rain_dec + 
##                 lu_mean_rain_jan + 
##                 lu_mean_rain_feb
##     
## 
##     irrigation =~ source_groundwater + 
##                   source_recycled +
##                   source_dams_tanks 
##                    
##   # regressions
##    yield ~ summer_temperature + water 
##   # residual correlations (covariances)
##     lu_mean_temp_dec ~~ lu_mean_rain_dec
##     lu_mean_temp_jan ~~ lu_mean_rain_jan
##     lu_mean_temp_feb ~~ lu_mean_rain_feb
##    
##     water =~ rainfall +irrigation
## 
##                npar                fmin               chisq                  df 
##              27.000               0.658             292.100              28.000 
##              pvalue      baseline.chisq         baseline.df     baseline.pvalue 
##               0.000            4720.144              45.000               0.000 
##                 cfi                 tli                nnfi                 rfi 
##               0.944               0.909               0.909               0.901 
##                 nfi                pnfi                 ifi                 rni 
##               0.938               0.584               0.944               0.944 
##                logl   unrestricted.logl                 aic                 bic 
##            -931.010            -784.960            1916.021            2007.893 
##              ntotal                bic2               rmsea      rmsea.ci.lower 
##             222.000            1922.328               0.206               0.185 
##      rmsea.ci.upper        rmsea.pvalue                 rmr          rmr_nomean 
##               0.228               0.000               0.078               0.078 
##                srmr        srmr_bentler srmr_bentler_nomean                crmr 
##               0.078               0.078               0.078               0.086 
##         crmr_nomean          srmr_mplus   srmr_mplus_nomean               cn_05 
##               0.086               0.078               0.078              32.417 
##               cn_01                 gfi                agfi                pgfi 
##              37.692               0.834               0.675               0.425 
##                 mfi                ecvi 
##               0.552               1.559
## lavaan 0.6-7 ended normally after 129 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of free parameters                         27
##                                                       
##   Number of observations                           222
##                                                       
## Model Test User Model:
##                                                       
##   Test statistic                               292.100
##   Degrees of freedom                                28
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                         Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   summer_temperature =~                                                      
##     lu_mean_tmp_jn         1.000                               1.000    1.004
##     lu_mean_tmp_dc         0.977    0.009  105.049    0.000    0.976    0.986
##     lu_mean_tmp_fb         0.991    0.007  142.840    0.000    0.990    0.991
##   rainfall =~                                                                
##     lu_mean_ran_dc         1.000                               0.942    0.920
##     lu_mean_ran_jn         1.094    0.030   36.055    0.000    1.030    1.020
##     lu_mean_ran_fb         0.960    0.040   24.128    0.000    0.904    0.906
##   irrigation =~                                                              
##     source_grndwtr         1.000                               1.001    1.003
##     source_recycld         0.993    0.005  201.408    0.000    0.993    0.996
##     sourc_dms_tnks         0.577    0.054   10.622    0.000    0.578    0.579
##   water =~                                                                   
##     rainfall               1.000                               0.373    0.373
##     irrigation            -1.891    0.390   -4.849    0.000   -0.663   -0.663
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   yield ~                                                               
##     summer_temprtr   -0.101    0.122   -0.823    0.410   -0.101   -0.101
##     water            -2.548    0.729   -3.498    0.000   -0.895   -0.897
## 
## Covariances:
##                         Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .lu_mean_temp_dec ~~                                                        
##    .lu_mean_ran_dc        -0.006    0.004   -1.421    0.155   -0.006   -0.092
##  .lu_mean_temp_jan ~~                                                        
##    .lu_mean_ran_jn         0.003    0.002    1.470    0.142    0.003    0.150
##  .lu_mean_temp_feb ~~                                                        
##    .lu_mean_ran_fb        -0.004    0.003   -1.242    0.214   -0.004   -0.074
##   summer_temperature ~~                                                      
##     water                 -0.155    0.043   -3.561    0.000   -0.441   -0.441
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .lu_mean_tmp_jn   -0.008    0.001   -7.476    0.000   -0.008   -0.008
##    .lu_mean_tmp_dc    0.027    0.003   10.150    0.000    0.027    0.027
##    .lu_mean_tmp_fb    0.019    0.002    9.692    0.000    0.019    0.019
##    .lu_mean_ran_dc    0.161    0.018    9.164    0.000    0.161    0.153
##    .lu_mean_ran_jn   -0.041    0.011   -3.590    0.000   -0.041   -0.040
##    .lu_mean_ran_fb    0.178    0.019    9.557    0.000    0.178    0.179
##    .source_grndwtr   -0.006    0.003   -1.674    0.094   -0.006   -0.006
##    .source_recycld    0.009    0.003    2.440    0.015    0.009    0.009
##    .sourc_dms_tnks    0.662    0.063   10.583    0.000    0.662    0.665
##    .yield             0.264    0.166    1.597    0.110    0.264    0.266
##     summer_temprtr    0.999    0.094   10.626    0.000    1.000    1.000
##    .rainfall          0.764    0.087    8.731    0.000    0.861    0.861
##    .irrigation        0.561    0.104    5.390    0.000    0.560    0.560
##     water             0.123    0.049    2.503    0.012    1.000    1.000
##  rmsea   srmr    cfi pvalue 
##  0.206  0.078  0.944  0.000
##                    l_mn_tmp_j l_mn_tmp_d l_mn_tmp_f l_mn_rn_d l_mn_rn_j
## lu_mean_temp_jan    1.000                                              
## lu_mean_temp_dec    0.990      1.000                                   
## lu_mean_temp_feb    0.995      0.977      1.000                        
## lu_mean_rain_dec   -0.152     -0.155     -0.150      1.000             
## lu_mean_rain_jan   -0.165     -0.165     -0.166      0.938     1.000   
## lu_mean_rain_feb   -0.149     -0.147     -0.152      0.834     0.924   
## source_groundwater  0.294      0.289      0.290     -0.228    -0.253   
## source_recycled     0.292      0.287      0.288     -0.227    -0.251   
## source_dams_tanks   0.170      0.167      0.168     -0.132    -0.146   
## yield               0.295      0.290      0.291     -0.292    -0.324   
## summer_temperature  1.004      0.986      0.991     -0.151    -0.167   
## rainfall           -0.165     -0.162     -0.163      0.920     1.020   
## irrigation          0.293      0.288      0.289     -0.227    -0.252   
## water              -0.442     -0.434     -0.436      0.343     0.380   
##                    l_mn_rn_f src_gr src_rc src_d_ yield  smmr_t ranfll irrgtn
## lu_mean_temp_jan                                                             
## lu_mean_temp_dec                                                             
## lu_mean_temp_feb                                                             
## lu_mean_rain_dec                                                             
## lu_mean_rain_jan                                                             
## lu_mean_rain_feb    1.000                                                    
## source_groundwater -0.225     1.000                                          
## source_recycled    -0.223     0.999  1.000                                   
## source_dams_tanks  -0.130     0.581  0.576  1.000                            
## yield              -0.288     0.567  0.563  0.327  1.000                     
## summer_temperature -0.149     0.293  0.291  0.169  0.294  1.000              
## rainfall            0.906    -0.248 -0.246 -0.143 -0.318 -0.164  1.000       
## irrigation         -0.224     1.003  0.996  0.579  0.565  0.292 -0.247  1.000
## water               0.338    -0.665 -0.660 -0.384 -0.852 -0.441  0.373 -0.663
##                    water 
## lu_mean_temp_jan         
## lu_mean_temp_dec         
## lu_mean_temp_feb         
## lu_mean_rain_dec         
## lu_mean_rain_jan         
## lu_mean_rain_feb         
## source_groundwater       
## source_recycled          
## source_dams_tanks        
## yield                    
## summer_temperature       
## rainfall                 
## irrigation               
## water               1.000

5.3 Model 3

In model 3, I took away the temperature and only left the mean temperature from December to February and irrigation in the model. The result for this model is much better than the previous one as the SRMR is done to 0.095 which is very close to 0.08. CFI is 0.918 which is still good. For RMSEA, it increase to 0.225 compared with the previous model. After that, I also run the factor loading table, which showing that only source_groundwater has high correlation with irrigation. Therefore, I removed the other two factors that I put under irrigation in previous model and run model 4. The result of this model improved to SRMR (0.07), which is lower than 0.08 and the same applied to CFI (0.921) which is greater than 0.08.

##                npar                fmin               chisq                  df 
##              12.000               0.221              98.149               8.000 
##              pvalue      baseline.chisq         baseline.df     baseline.pvalue 
##               0.000            1113.013              15.000               0.000 
##                 cfi                 tli                nnfi                 rfi 
##               0.918               0.846               0.846               0.835 
##                 nfi                pnfi                 ifi                 rni 
##               0.912               0.486               0.918               0.918 
##                logl   unrestricted.logl                 aic                 bic 
##           -1065.084           -1016.010            2154.168            2195.000 
##              ntotal                bic2               rmsea      rmsea.ci.lower 
##             222.000            2156.971               0.225               0.187 
##      rmsea.ci.upper        rmsea.pvalue                 rmr          rmr_nomean 
##               0.266               0.000               0.095               0.095 
##                srmr        srmr_bentler srmr_bentler_nomean                crmr 
##               0.095               0.095               0.095               0.111 
##         crmr_nomean          srmr_mplus   srmr_mplus_nomean               cn_05 
##               0.111               0.094               0.094              36.076 
##               cn_01                 gfi                agfi                pgfi 
##              46.442               0.866               0.648               0.330 
##                 mfi                ecvi 
##               0.816               0.550
## lavaan 0.6-7 ended normally after 63 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of free parameters                         12
##                                                       
##   Number of observations                           222
##                                                       
## Model Test User Model:
##                                                       
##   Test statistic                                98.149
##   Degrees of freedom                                 8
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   rainfall =~                                                           
##     lu_mean_ran_dc    1.000                               0.912    0.914
##     lu_mean_ran_jn    1.118    0.032   34.508    0.000    1.020    1.022
##     lu_mean_ran_fb    0.987    0.042   23.332    0.000    0.900    0.902
##   irrigation =~                                                         
##     source_grndwtr    1.000                               0.998    1.000
##   water =~                                                              
##     rainfall          1.000                               0.372    0.372
##     irrigation       -1.879    0.400   -4.702    0.000   -0.639   -0.639
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   yield ~                                                               
##     lu_mn_tmp_smmr    0.121    0.053    2.291    0.022    0.121    0.124
##     water            -2.465    0.645   -3.820    0.000   -0.836   -0.854
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .lu_mean_ran_dc    0.164    0.018    9.240    0.000    0.164    0.165
##    .lu_mean_ran_jn   -0.045    0.012   -3.820    0.000   -0.045   -0.045
##    .lu_mean_ran_fb    0.186    0.019    9.548    0.000    0.186    0.186
##    .source_grndwtr    0.000                               0.000    0.000
##    .yield             0.246    0.156    1.576    0.115    0.246    0.256
##    .rainfall          0.717    0.084    8.578    0.000    0.862    0.862
##    .irrigation        0.589    0.106    5.582    0.000    0.592    0.592
##     water             0.115    0.047    2.446    0.014    1.000    1.000
##  rmsea   srmr    cfi pvalue 
##  0.225  0.095  0.918  0.000
Factor Loadings
Latent Factor Indicator B SE Z p-value Beta
rainfall lu_mean_rain_dec 1.000 0.000 NA NA 0.914
rainfall lu_mean_rain_jan 1.118 0.032 34.508 0 1.022
rainfall lu_mean_rain_feb 0.987 0.042 23.332 0 0.902
irrigation source_groundwater 1.000 0.000 NA NA 1.000
water rainfall 1.000 0.000 NA NA 0.372
water irrigation -1.879 0.400 -4.702 0 -0.639

6. Conclusion

From this analysis, it was found that rainfall (December, January, February) has high impact on grape productivity. However, all of the model has the poor RMSEA. The RMSEA seeks to examine whether a model exceeds a reasonable level of close fit to the data, which would indicate misfit. This could be because of low correlations among the variables. All the models results shows insignificant chi-squared p-value that are below 0.05. Also, the sample size may be another issue I need to think of. According to Dexin, S 2018), in order for the chi-square test to be effective, an important assumption is that the sample size (N) should be large enough. It is generally believed that fitting a large SEM model (with many observed variables) to a moderate or small sample will lead to deviations in the estimated value of the chi-square statistic.

7. Reflection

In this assignment, I learn that SEM model is very flexible, because it deals not only with a single simple or multiple linear regression, but with a system of regression equations. However, further research need to be done for better using SEM model. Firstly, there are other factors can influence productivity: land uses and management practices of the land etc. Secondly, instead of using SA2 region, I can narrow down to one specific area that may help me to control the independent variables. Last but not least, as SEM requires a strong theoretical knowledge, more academic research need to be done before building up SEM model.

8. Appendix

Model1:

model1 <- ’ #latent variable model summer_temperature =~ lu_mean_temp_jan + lu_mean_temp_dec + lu_mean_temp_feb winter_temperature =~ lu_mean_temp_jul + lu_mean_temp_aug + lu_mean_temp_sep

#regressions yield ~ summer_temperature + winter_temperature

#residual correlations (covariances)

fit1 <- sem(model1, data=yield_by_region_m)

parTable(fit1) fitmeasures(fit1)

summary(fit1, standardized=TRUE)

semPaths(fit1,what=“paths”, whatLabels = “stand”, rotation = 1) modindices(fit1) fitMeasures(fit1, c(“rmsea”, “srmr”, “cfi”, “pvalue”))

inspect(fit1, what=“cor.all”) lavCor(fit1)

Model2:

model2 <- ’ # latent variable model summer_temperature =~ lu_mean_temp_jan + lu_mean_temp_dec + lu_mean_temp_feb

rainfall =~ lu_mean_rain_dec + 
            lu_mean_rain_jan + 
            lu_mean_rain_feb


irrigation =~ source_groundwater + 
              source_recycled +
              source_dams_tanks 
               

# regressions yield ~ summer_temperature + water # residual correlations (covariances) lu_mean_temp_dec ~~ lu_mean_rain_dec lu_mean_temp_jan ~~ lu_mean_rain_jan lu_mean_temp_feb ~~ lu_mean_rain_feb

water =~ rainfall +irrigation

fit2 <- sem(model2, data=yield_by_region_m)

parTable(fit2) fitmeasures(fit2)

summary(fit2, standardized=TRUE)

semPaths(fit2,what=“paths”, whatLabels = “stand”, rotation = 1) modindices(fit2) fitMeasures(fit2, c(“rmsea”, “srmr”, “cfi”, “pvalue”))

inspect(fit2, what=“cor.all”)

Model3

model3 <- ’

rainfall =~ lu_mean_rain_dec + lu_mean_rain_jan + lu_mean_rain_feb

irrigation =~ source_groundwater

yield ~ lu_mean_temp_summer + water

water =~ rainfall +irrigation

fit3 <- sem(model3, data=yield_by_region_m)

parTable(fit3) fitmeasures(fit3)

summary(fit3, standardized=TRUE)

semPaths(fit3,what=“paths”, whatLabels = “stand”, rotation = 1) modindices(fit3) fitMeasures(fit3, c(“rmsea”, “srmr”, “cfi”, “pvalue”))

parameterEstimates(fit3, standardized=TRUE) %>% filter(op == “=~”) %>% dplyr::select(‘Latent Factor’=lhs, Indicator=rhs, B=est, SE=se, Z=z, ‘p-value’=pvalue, Beta=std.all) %>% kable(digits = 3, format=“pandoc”, caption=“Factor Loadings”)

9. reference:

  1. Webb,L,B. P.H.Whetton and E.W.R Barlow (2005). Impact on Australian Viticulture from Greenhouse Induced Temperature Change, viewed 20 September 2020, <https://www.researchgate.net/publication/237556186_Impact_on_Australian_Viticulture_from_Greenhouse_Induced_Temperature_Change >

  2. Michael,H (2018). Introductory SEM using lavaan, viewed 06 Oct. 2020, <https://psu-psychology.github.io/r-bootcamp-2018/talks/lavaan_tutorial.html# >

  3. Foundation for National Parks & Wildlife 2018, The State Of Wine Grape Production In Australia, viewed 8th Nov 2020, http://www.backyardbuddies.net.au/the-state-of-wine-grape-production-in-australia/

  4. Cornell University n.d., Fit Indices commonly reported for CFA and SEM, viewed 8th Nov 2020,< https://www.cscu.cornell.edu/news/Handouts/SEM_fit.pdf >

  5. Hu, L. & Bentler, P.M. 1999, ‘Cutoff criteria for fit indexes in covariance structure analysis: Conventional criteria versus new alternatives’, Structural Equation Modeling: A Multidisciplinary Journal, vol. 6, no. 1, pp. 1–55.

  6. Dexin, S.,Taehun, L & Alberto M 2018, Understanding the Model Size Effect on SEM Fit Indicesm, viewed 8th Nov 2020, <https://journals.sagepub.com/doi/full/10.1177/0013164418783530#abstract >